= bd38883299 Added settings screen, even if the look has to be polished and new items have to be added
The toolshop-button and the settings-button in the topBar now consist of icons (no text). Bad thing is, that the 'disabled' state doesn't look that good
Every screen is given its caller when flipped to. At OnBackKeyDown you can now either 'flipToCaller()' or 'flipToPreviousScreenInTree()' or as you wish...
2017-09-10 15:10:40 +02:00

113 lines
4.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#a600f9"
android:clipChildren="false">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topbar_levellayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginEnd="20dp"
android:layout_marginStart="5dp"
android:clipChildren="false"
android:orientation="vertical">
<TextView
android:id="@+id/topbar_leveldisplay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/topbar_level_placeholder"
android:textSize="25sp"/>
<ProgressBar
android:id="@+id/topbar_levelprogress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:progress="50"/>
</LinearLayout>
<ImageView
android:id="@+id/topbar_starview"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/topbar_levellayout"
android:background="@drawable/currency_star"/>
<ImageView
android:id="@+id/topbar_energyview"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:layout_toEndOf="@+id/topbar_starcount"
android:layout_toRightOf="@+id/topbar_starcount"
android:background="@drawable/currency_energy"/>
<TextView
android:id="@+id/topbar_starcount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/topbar_starview"
android:text="@string/number_placeholder"
android:textSize="25sp"/>
<TextView
android:id="@+id/topbar_energycount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/topbar_energyview"
android:text="@string/number_placeholder"
android:textSize="25sp"/>
<Button
android:id="@+id/topbar_settings"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerVertical="true"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/topbar_toolshop"
android:layout_toStartOf="@+id/topbar_toolshop"
android:background="@drawable/xml_selector_settingsbutton"/>
<Button
android:id="@+id/topbar_toolshop"
style="@style/GameButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/xml_selector_shopbutton"/>
<TextView
android:id="@+id/topbar_starcount_decrease"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/topbar_starcount"
android:layout_centerVertical="true"
android:text="@string/number_placeholder"
android:textSize="20sp"
android:visibility="invisible"/>
<TextView
android:id="@+id/topbar_energycount_decrease"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/topbar_energycount"
android:layout_centerVertical="true"
android:text="@string/number_placeholder"
android:textSize="20sp"
android:visibility="invisible"/>
</RelativeLayout>