Updated UI
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>
This commit is contained in:
@@ -20,13 +20,26 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
layout="@layout/dice_selector" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/roll_button"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/die_selector"
|
||||
android:layout_marginTop="10dip"
|
||||
android:text="@string/roll" />
|
||||
android:layout_marginTop="10dip" >
|
||||
|
||||
<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>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<RelativeLayout
|
||||
@@ -26,12 +27,25 @@
|
||||
layout="@layout/dice_selector" />
|
||||
</RelativeLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/roll_button"
|
||||
<RelativeLayout
|
||||
android:layout_width="0px"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/roll" />
|
||||
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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<item>-3</item>
|
||||
<item>-2</item>
|
||||
<item>-1</item>
|
||||
<item>0</item>
|
||||
<item>+0</item>
|
||||
<item>+1</item>
|
||||
<item>+2</item>
|
||||
<item>+3</item>
|
||||
|
||||
Reference in New Issue
Block a user