Added a progress bar (indeterminate circle) centered over the roll button. It is shown only during rolls. Moved rolling to another thread Roll Button is disabled during a roll Change-Id: I6a6bfb9723af3b1292eb3df2f8810fb738f83876 Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
69 lines
2.4 KiB
XML
Executable File
69 lines
2.4 KiB
XML
Executable File
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:myapp="com.TwentyCode.android.ExaltedDice"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="fill_parent"
|
|
android:orientation="vertical" >
|
|
|
|
<LinearLayout
|
|
android:id="@+id/holder"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentTop="true"
|
|
android:baselineAligned="false"
|
|
android:orientation="horizontal" >
|
|
|
|
<RelativeLayout
|
|
android:layout_width="0px"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="2" >
|
|
|
|
<include
|
|
android:id="@+id/die_selector"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerHorizontal="true"
|
|
android:layout_gravity="center"
|
|
layout="@layout/dice_selector" />
|
|
</RelativeLayout>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="0px"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1" >
|
|
|
|
<Button
|
|
android:id="@+id/roll_button"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:text="@string/roll" />
|
|
|
|
<ProgressBar
|
|
android:id="@+id/roll_progress"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerHorizontal="true"
|
|
android:layout_centerVertical="true"
|
|
android:visibility="gone" />
|
|
</RelativeLayout>
|
|
</LinearLayout>
|
|
|
|
<ListView
|
|
android:id="@+id/list"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_above="@+id/ad"
|
|
android:layout_below="@id/holder"
|
|
android:layout_gravity="top" />
|
|
|
|
<com.admob.android.ads.AdView
|
|
android:id="@id/ad"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentBottom="true"
|
|
android:layout_gravity="bottom"
|
|
myapp:backgroundColor="#000000"
|
|
myapp:primaryTextColor="#FFFFFF"
|
|
myapp:secondaryTextColor="#CCCCCC" />
|
|
|
|
</RelativeLayout> |