Updated UI to allow the user to select different dice, removed old
unneeded code Change-Id: Iecfc11ed9663ec302d362fa8da4a3cd81d8e7d82
This commit is contained in:
30
ExaltedDice/res/layout/dice_selector.xml
Normal file
30
ExaltedDice/res/layout/dice_selector.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/d_Picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginLeft="10dip" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dip"
|
||||
android:layout_toRightOf="@id/d_Picker"
|
||||
android:text="Number"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/number_Picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toRightOf="@+id/textView2" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,60 +1,41 @@
|
||||
<?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"
|
||||
xmlns:myapp="com.TwentyCode.android.ExaltedDice"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical" >
|
||||
|
||||
<com.TwentyCode.android.ExaltedDice.NumberPickerButton android:id="@+id/down"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="-"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dice"
|
||||
android:layout_width="100px"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1"
|
||||
android:textSize="18sp"
|
||||
android:gravity="left"
|
||||
android:phoneNumber="true"
|
||||
/>
|
||||
|
||||
<com.TwentyCode.android.ExaltedDice.NumberPickerButton
|
||||
android:id="@+id/up"
|
||||
android:layout_width="60px"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="+"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/roll"
|
||||
android:layout_width="100px"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Roll"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<include
|
||||
android:id="@+id/die_selector"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
layout="@layout/dice_selector" />
|
||||
|
||||
<ListView android:id="@+id/list"
|
||||
android:layout_gravity="top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
|
||||
<com.admob.android.ads.AdView
|
||||
android:id="@+id/ad"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
myapp:backgroundColor="#000000"
|
||||
myapp:primaryTextColor="#FFFFFF"
|
||||
myapp:secondaryTextColor="#CCCCCC"/>
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/roll_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/die_selector"
|
||||
android:text="Roll!" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/ad"
|
||||
android:layout_below="@id/roll_button"
|
||||
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>
|
||||
Reference in New Issue
Block a user