add newGroup menu for when button's hidden; add deleteAll menuitem to

set of debug-features (but this should probably not ship until
deleting is changed.)
This commit is contained in:
Eric House 2012-11-21 06:17:09 -08:00
parent cf88b60c4b
commit dcf239ca48
6 changed files with 17 additions and 24 deletions

View file

@ -25,16 +25,12 @@
android:layout_height="wrap_content"
>
<Button android:id="@+id/exchange_commit"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/button_trade_commit"
style="@style/spaced_buttons"
/>
<Button android:id="@+id/exchange_cancel"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/button_trade_cancel"
style="@style/spaced_buttons"
/>
</LinearLayout>

View file

@ -26,9 +26,7 @@
>
<Button android:id="@+id/button_rescan"
android:text="@string/bt_pick_rescan_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/spaced_buttons"
/>
<!-- <Button android:id="@+id/button_reconfigure" -->
<!-- android:text="@string/bt_pick_reconfig_button" -->
@ -38,9 +36,7 @@
<!-- /> -->
<Button android:id="@+id/button_clear"
android:text="@string/bt_pick_clear_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/spaced_buttons"
/>
</LinearLayout>

View file

@ -20,16 +20,12 @@
android:layout_weight="0"
>
<Button android:id="@+id/revert_colors"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_revert_colors"
style="@style/spaced_buttons"
/>
<Button android:id="@+id/revert_all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/button_revert_all"
style="@style/spaced_buttons"
/>
</LinearLayout>
</LinearLayout>

View file

@ -41,9 +41,7 @@
>
<Button android:id="@+id/button_add"
android:text="@string/button_sms_add"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:layout_weight="1"
style="@style/spaced_buttons"
/>
<ImageButton android:id="@+id/manual_add_button"
android:layout_height="fill_parent"
@ -53,9 +51,7 @@
/>
<Button android:id="@+id/button_clear"
android:text="@string/bt_pick_clear_button"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:layout_weight="1"
style="@style/spaced_buttons"
/>
</LinearLayout>

View file

@ -5,6 +5,10 @@
android:title="@string/button_new_game"
android:icon="@android:drawable/ic_menu_add"
/>
<item android:id="@+id/gamel_menu_newgroup"
android:title="@string/button_new_group"
android:icon="@android:drawable/ic_menu_add"
/>
<item android:id="@+id/gamel_menu_prefs"
android:title="@string/menu_prefs"
android:icon="@android:drawable/ic_menu_preferences"

View file

@ -81,6 +81,7 @@ public class GamesList extends XWExpandableListActivity
private static final int[] DEBUGITEMS = { R.id.gamel_menu_loaddb
, R.id.gamel_menu_storedb
, R.id.gamel_menu_checkupdates
, R.id.gamel_menu_delete_all
};
private static boolean s_firstShown = false;
@ -659,6 +660,10 @@ public class GamesList extends XWExpandableListActivity
startNewGameActivity();
break;
case R.id.gamel_menu_newgroup:
showDialog( NEW_GROUP );
break;
case R.id.gamel_menu_delete_all:
if ( DBUtils.gamesList( this ).length > 0 ) {
showConfirmThen( R.string.confirm_delete_all,