First shape-inspector implementation

Toolshop layout polished
This commit is contained in:
=
2017-10-29 13:06:46 +01:00
parent 8cc9353c3b
commit c9e718f6ad
13 changed files with 273 additions and 192 deletions

View File

@ -14,7 +14,7 @@ import de.frajul.endlessroll.views.TopBar;
/**
* Created by Julian on 08.07.2016.
*/
public class PlayerShapeShopScreen extends Screen<LinearLayout> implements PlayerShapeButtonOnClickListener {
public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements PlayerShapeButtonOnClickListener {
private PlayerShapeButton activeButton;

View File

@ -10,12 +10,12 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/placeholder_button"
android:textSize="30sp"/>
android:textSize="28sp"/>
<Button
android:id="@+id/shape_button_button"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/playershapes_ball"/>

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/shape_inspector_width"
android:layout_height="match_parent"
android:background="#e6ffc936"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/tool_inspector_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Smiley"
android:textAlignment="center"
android:textSize="28sp"/>
<ImageView
android:id="@+id/tool_inspector_imageview"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/playershapes_smiley"
android:layout_marginBottom="20dp"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="First task"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Second task"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/tool_inspector_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="Don't worry - roll happy!"
android:textAlignment="center"
android:textSize="20sp"/>
</RelativeLayout>
</LinearLayout>

View File

@ -1,55 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgrounds_menu_grass"
android:orientation="vertical">
android:background="@drawable/backgrounds_menu_grass">
<include
android:id="@+id/shape_shop_topbar"
layout="@layout/topbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_marginBottom="5dp"/>
android:layout_height="wrap_content"/>
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_below="@id/shape_shop_topbar">
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_toLeftOf="@id/shape_shop_shape_inspector"
android:orientation="vertical">
<LinearLayout
android:id="@+id/shape_shop_topRow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="match_parent">
</RelativeLayout>
<LinearLayout
android:id="@+id/shape_shop_topRow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal"/>
<RelativeLayout
android:layout_width="match_parent"
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:id="@+id/shape_shop_bottomRow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal"/>
</RelativeLayout>
</LinearLayout>
<include
android:id="@+id/shape_shop_shape_inspector"
layout="@layout/shape_inspector"
android:layout_width="@dimen/shape_inspector_width"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_alignParentEnd="true"/>
<LinearLayout
android:id="@+id/shape_shop_bottomRow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="horizontal"/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -10,7 +10,8 @@
android:layout_height="wrap_content"
android:text="@string/placeholder_textview"
android:layout_gravity="center_horizontal"
android:textSize="25sp"/>
android:textAlignment="center"
android:textSize="22sp"/>
<include
android:id="@+id/toolofferslot_slot"

View File

@ -5,8 +5,8 @@
<ImageView
android:id="@+id/toolslot_image"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_width="@dimen/tool_button_width"
android:layout_height="@dimen/tool_button_height"
android:layout_gravity="center"
android:background="@drawable/xml_background_toolslot"
android:src="@drawable/tools_ramp_button"/>

View File

@ -4,24 +4,24 @@
android:layout_height="wrap_content">
<ImageView
android:id="@+id/toolProgressBarView"
android:layout_width="70dp"
android:layout_height="60dp"
android:id="@+id/tool_button_background_layer"
android:layout_width="@dimen/tool_button_width"
android:layout_height="@dimen/tool_button_height"
android:layout_centerInParent="true"
android:src="@drawable/tools_ramp_button"/>
<ImageView
android:id="@+id/toolProgressButtonAnimation"
android:layout_width="70dp"
android:layout_height="60dp"
android:id="@+id/tool_button_animation_layer"
android:layout_width="@dimen/tool_button_width"
android:layout_height="@dimen/tool_button_height"
android:src="@drawable/tools_ramp_button"
android:visibility="invisible"/>
<ProgressBar
android:id="@+id/toolProgressBar"
android:id="@+id/tool_button_progress_bar"
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_height="@dimen/tool_button_height"
android:layout_centerInParent="true"
android:max="100"
android:progress="100"

View File

@ -22,12 +22,12 @@
android:layout_toStartOf="@+id/toolshop_toolinspector">
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:id="@+id/linearLayout4">
android:orientation="horizontal">
<include
android:id="@+id/toolshop_slot1"
@ -61,22 +61,33 @@
</LinearLayout>
<HorizontalScrollView
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
android:layout_height="match_parent"
android:layout_below="@+id/linearLayout4">
<LinearLayout
android:id="@+id/toolshop_tool_offer_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:orientation="horizontal">
android:layout_centerInParent="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/toolshop_tool_offer_top_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal"/>
<LinearLayout
android:id="@+id/toolshop_tool_offer_bottom_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"/>
</LinearLayout>
</HorizontalScrollView>
</RelativeLayout>
</RelativeLayout>

View File

@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="tool_inspector_width">170dp</dimen>
<dimen name="shape_inspector_width">170dp</dimen>
<dimen name="tool_button_width">70dp</dimen>
<dimen name="tool_button_height">60dp</dimen>
</resources>

View File

@ -61,7 +61,7 @@
<string name="tool_name_spring">Spring</string>
<string name="tool_name_magnet">Magnet</string>
<string name="tool_name_bomb">Bomb</string>
<string name="tool_name_power_mushroom">Power Mushroom</string>
<string name="tool_name_power_mushroom">Mushroom</string>
<string name="tool_level_format_d">Level: %d</string>
<string name="tool_upgrade_title_format_sd">%1$s (Lv%2$d)</string>
<string name="tool_upgrade_none">None</string>