mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-24 07:58:34 +01:00
snapshot: tons of changes toward dual-pane. Board opening is about
all that works.
This commit is contained in:
parent
bbc3d0e8e3
commit
96eacabf10
31 changed files with 1036 additions and 229 deletions
1
xwords4/android/XWords4/.gitignore
vendored
1
xwords4/android/XWords4/.gitignore
vendored
|
@ -3,7 +3,6 @@ ant_out.txt
|
|||
local.properties
|
||||
bin
|
||||
gen
|
||||
libs
|
||||
proguard.cfg
|
||||
obj
|
||||
res/drawable*/*gen.png
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
android:name=".XWApp"
|
||||
>
|
||||
|
||||
<activity android:name="GamesListActivity"
|
||||
<activity android:name="Main"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="standard"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
|
@ -82,9 +82,15 @@
|
|||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="@string/xwords_nfc_mime" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name="FragActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
/>
|
||||
<activity android:name="GamesListActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
/>
|
||||
|
||||
<activity android:name="DictsActivity"
|
||||
android:label="@string/title_dicts_list"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
|
|
|
@ -78,216 +78,219 @@ public final class R {
|
|||
}
|
||||
public static final class id {
|
||||
public static final int about_xlator=0x7f0a0001;
|
||||
public static final int add_player=0x7f0a002a;
|
||||
public static final int advertise_new_room_check=0x7f0a0030;
|
||||
public static final int blessed_label=0x7f0a0050;
|
||||
public static final int board_menu_chat=0x7f0a00aa;
|
||||
public static final int board_menu_dict=0x7f0a00a6;
|
||||
public static final int board_menu_done=0x7f0a0091;
|
||||
public static final int board_menu_file_about=0x7f0a009f;
|
||||
public static final int board_menu_file_prefs=0x7f0a009e;
|
||||
public static final int board_menu_flip=0x7f0a00a8;
|
||||
public static final int board_menu_game_counts=0x7f0a0097;
|
||||
public static final int board_menu_game_history=0x7f0a0099;
|
||||
public static final int board_menu_game_left=0x7f0a0098;
|
||||
public static final int board_menu_game_netstats=0x7f0a00a0;
|
||||
public static final int board_menu_game_resend=0x7f0a009b;
|
||||
public static final int board_menu_game_resign=0x7f0a009a;
|
||||
public static final int board_menu_hint_next=0x7f0a00a4;
|
||||
public static final int board_menu_hint_prev=0x7f0a00a3;
|
||||
public static final int board_menu_invite=0x7f0a0090;
|
||||
public static final int board_menu_juggle=0x7f0a00a7;
|
||||
public static final int board_menu_toggle=0x7f0a00ab;
|
||||
public static final int board_menu_trade=0x7f0a0092;
|
||||
public static final int board_menu_trade_cancel=0x7f0a0093;
|
||||
public static final int board_menu_trade_commit=0x7f0a0094;
|
||||
public static final int board_menu_tray=0x7f0a0096;
|
||||
public static final int board_menu_undo_current=0x7f0a00a5;
|
||||
public static final int board_menu_undo_last=0x7f0a0095;
|
||||
public static final int board_menu_zoom=0x7f0a00a9;
|
||||
public static final int activity_button=0x7f0a005d;
|
||||
public static final int add_player=0x7f0a002b;
|
||||
public static final int advertise_new_room_check=0x7f0a0031;
|
||||
public static final int blessed_label=0x7f0a0051;
|
||||
public static final int board_menu_chat=0x7f0a00ad;
|
||||
public static final int board_menu_dict=0x7f0a00a9;
|
||||
public static final int board_menu_done=0x7f0a0094;
|
||||
public static final int board_menu_file_about=0x7f0a00a2;
|
||||
public static final int board_menu_file_prefs=0x7f0a00a1;
|
||||
public static final int board_menu_flip=0x7f0a00ab;
|
||||
public static final int board_menu_game_counts=0x7f0a009a;
|
||||
public static final int board_menu_game_history=0x7f0a009c;
|
||||
public static final int board_menu_game_left=0x7f0a009b;
|
||||
public static final int board_menu_game_netstats=0x7f0a00a3;
|
||||
public static final int board_menu_game_resend=0x7f0a009e;
|
||||
public static final int board_menu_game_resign=0x7f0a009d;
|
||||
public static final int board_menu_hint_next=0x7f0a00a7;
|
||||
public static final int board_menu_hint_prev=0x7f0a00a6;
|
||||
public static final int board_menu_invite=0x7f0a0093;
|
||||
public static final int board_menu_juggle=0x7f0a00aa;
|
||||
public static final int board_menu_toggle=0x7f0a00ae;
|
||||
public static final int board_menu_trade=0x7f0a0095;
|
||||
public static final int board_menu_trade_cancel=0x7f0a0096;
|
||||
public static final int board_menu_trade_commit=0x7f0a0097;
|
||||
public static final int board_menu_tray=0x7f0a0099;
|
||||
public static final int board_menu_undo_current=0x7f0a00a8;
|
||||
public static final int board_menu_undo_last=0x7f0a0098;
|
||||
public static final int board_menu_zoom=0x7f0a00ac;
|
||||
public static final int board_root=0x7f0a0002;
|
||||
public static final int board_view=0x7f0a0003;
|
||||
public static final int boardsize_spinner=0x7f0a003d;
|
||||
public static final int bt_disabled=0x7f0a0068;
|
||||
public static final int bt_separator=0x7f0a0067;
|
||||
public static final int bt_stuff=0x7f0a006a;
|
||||
public static final int button_add=0x7f0a007f;
|
||||
public static final int boardsize_spinner=0x7f0a003e;
|
||||
public static final int bt_disabled=0x7f0a006b;
|
||||
public static final int bt_separator=0x7f0a006a;
|
||||
public static final int bt_stuff=0x7f0a006d;
|
||||
public static final int button_add=0x7f0a0082;
|
||||
public static final int button_clear=0x7f0a000b;
|
||||
public static final int button_done=0x7f0a005b;
|
||||
public static final int button_done=0x7f0a005c;
|
||||
public static final int button_invite=0x7f0a000c;
|
||||
public static final int button_rescan=0x7f0a000a;
|
||||
public static final int button_study=0x7f0a005a;
|
||||
public static final int chat_button=0x7f0a008b;
|
||||
public static final int button_study=0x7f0a005b;
|
||||
public static final int chat_button=0x7f0a008e;
|
||||
public static final int chat_edit=0x7f0a000e;
|
||||
public static final int chat_history=0x7f0a000d;
|
||||
public static final int chat_menu_clear=0x7f0a00ac;
|
||||
public static final int checkbox=0x7f0a004a;
|
||||
public static final int chat_menu_clear=0x7f0a00af;
|
||||
public static final int checkbox=0x7f0a004b;
|
||||
public static final int color_display_sample=0x7f0a0010;
|
||||
public static final int color_edit_sample=0x7f0a0011;
|
||||
public static final int config_button=0x7f0a007b;
|
||||
public static final int config_button=0x7f0a007e;
|
||||
public static final int confirm_sms_reasons=0x7f0a0018;
|
||||
public static final int connect_set_relay=0x7f0a002c;
|
||||
public static final int connect_set_sms=0x7f0a0034;
|
||||
public static final int del=0x7f0a004d;
|
||||
public static final int connect_set_relay=0x7f0a002d;
|
||||
public static final int connect_set_sms=0x7f0a0035;
|
||||
public static final int del=0x7f0a004e;
|
||||
public static final int desc=0x7f0a001b;
|
||||
public static final int details=0x7f0a007c;
|
||||
public static final int dict_label=0x7f0a0071;
|
||||
public static final int dict_spinner=0x7f0a0027;
|
||||
public static final int dictlist_button=0x7f0a008a;
|
||||
public static final int dicts_delete=0x7f0a00af;
|
||||
public static final int dicts_deselect_all=0x7f0a00ae;
|
||||
public static final int dicts_download=0x7f0a00ad;
|
||||
public static final int dicts_move=0x7f0a00b0;
|
||||
public static final int dicts_select=0x7f0a00b1;
|
||||
public static final int details=0x7f0a007f;
|
||||
public static final int dict_label=0x7f0a0074;
|
||||
public static final int dict_spinner=0x7f0a0028;
|
||||
public static final int dictlist_button=0x7f0a008d;
|
||||
public static final int dicts_delete=0x7f0a00b2;
|
||||
public static final int dicts_deselect_all=0x7f0a00b1;
|
||||
public static final int dicts_download=0x7f0a00b0;
|
||||
public static final int dicts_move=0x7f0a00b3;
|
||||
public static final int dicts_select=0x7f0a00b4;
|
||||
public static final int divider=0x7f0a0020;
|
||||
public static final int download_button=0x7f0a007d;
|
||||
public static final int dwnld_message=0x7f0a0048;
|
||||
public static final int edit=0x7f0a006d;
|
||||
public static final int download_button=0x7f0a0080;
|
||||
public static final int dwnld_message=0x7f0a0049;
|
||||
public static final int edit=0x7f0a0070;
|
||||
public static final int edit_blue=0x7f0a0017;
|
||||
public static final int edit_green=0x7f0a0015;
|
||||
public static final int edit_red=0x7f0a0013;
|
||||
public static final int english_label=0x7f0a004e;
|
||||
public static final int english_view=0x7f0a004f;
|
||||
public static final int english_label=0x7f0a004f;
|
||||
public static final int english_view=0x7f0a0050;
|
||||
public static final int exchange_buttons=0x7f0a0004;
|
||||
public static final int exchange_cancel=0x7f0a0006;
|
||||
public static final int exchange_commit=0x7f0a0005;
|
||||
public static final int expander=0x7f0a003f;
|
||||
public static final int explain=0x7f0a0079;
|
||||
public static final int filters=0x7f0a0055;
|
||||
public static final int flip_button=0x7f0a008d;
|
||||
public static final int game_locked_check=0x7f0a0022;
|
||||
public static final int game_name=0x7f0a003e;
|
||||
public static final int gamel_menu_checkmoves=0x7f0a009d;
|
||||
public static final int games_game_config=0x7f0a00bc;
|
||||
public static final int games_game_copy=0x7f0a00c1;
|
||||
public static final int games_game_delete=0x7f0a00bb;
|
||||
public static final int games_game_move=0x7f0a00bd;
|
||||
public static final int games_game_new_from=0x7f0a00bf;
|
||||
public static final int games_game_rename=0x7f0a00c0;
|
||||
public static final int games_game_reset=0x7f0a00be;
|
||||
public static final int games_group_default=0x7f0a00c5;
|
||||
public static final int games_group_delete=0x7f0a00c4;
|
||||
public static final int games_group_movedown=0x7f0a00c3;
|
||||
public static final int games_group_moveup=0x7f0a00c2;
|
||||
public static final int games_group_rename=0x7f0a00c6;
|
||||
public static final int games_menu_about=0x7f0a00b8;
|
||||
public static final int games_menu_checkmoves=0x7f0a00ba;
|
||||
public static final int games_menu_checkupdates=0x7f0a00c7;
|
||||
public static final int games_menu_dicts=0x7f0a00b6;
|
||||
public static final int games_menu_email=0x7f0a00b7;
|
||||
public static final int games_menu_loaddb=0x7f0a00c9;
|
||||
public static final int games_menu_newgame=0x7f0a00b2;
|
||||
public static final int games_menu_newgroup=0x7f0a00b3;
|
||||
public static final int games_menu_prefs=0x7f0a00b4;
|
||||
public static final int games_menu_rateme=0x7f0a00b5;
|
||||
public static final int games_menu_resend=0x7f0a00b9;
|
||||
public static final int games_menu_storedb=0x7f0a00c8;
|
||||
public static final int games_menu_study=0x7f0a009c;
|
||||
public static final int group_done=0x7f0a008f;
|
||||
public static final int group_exchange=0x7f0a00a1;
|
||||
public static final int group_hint=0x7f0a00a2;
|
||||
public static final int hideable=0x7f0a0044;
|
||||
public static final int hints_allowed=0x7f0a0036;
|
||||
public static final int expander=0x7f0a0040;
|
||||
public static final int explain=0x7f0a007c;
|
||||
public static final int filters=0x7f0a0056;
|
||||
public static final int flip_button=0x7f0a0090;
|
||||
public static final int fragment_button=0x7f0a005e;
|
||||
public static final int game_locked_check=0x7f0a0023;
|
||||
public static final int game_name=0x7f0a003f;
|
||||
public static final int gamel_menu_checkmoves=0x7f0a00a0;
|
||||
public static final int games_game_config=0x7f0a00bf;
|
||||
public static final int games_game_copy=0x7f0a00c4;
|
||||
public static final int games_game_delete=0x7f0a00be;
|
||||
public static final int games_game_move=0x7f0a00c0;
|
||||
public static final int games_game_new_from=0x7f0a00c2;
|
||||
public static final int games_game_rename=0x7f0a00c3;
|
||||
public static final int games_game_reset=0x7f0a00c1;
|
||||
public static final int games_group_default=0x7f0a00c8;
|
||||
public static final int games_group_delete=0x7f0a00c7;
|
||||
public static final int games_group_movedown=0x7f0a00c6;
|
||||
public static final int games_group_moveup=0x7f0a00c5;
|
||||
public static final int games_group_rename=0x7f0a00c9;
|
||||
public static final int games_menu_about=0x7f0a00bb;
|
||||
public static final int games_menu_checkmoves=0x7f0a00bd;
|
||||
public static final int games_menu_checkupdates=0x7f0a00ca;
|
||||
public static final int games_menu_dicts=0x7f0a00b9;
|
||||
public static final int games_menu_email=0x7f0a00ba;
|
||||
public static final int games_menu_loaddb=0x7f0a00cc;
|
||||
public static final int games_menu_newgame=0x7f0a00b5;
|
||||
public static final int games_menu_newgroup=0x7f0a00b6;
|
||||
public static final int games_menu_prefs=0x7f0a00b7;
|
||||
public static final int games_menu_rateme=0x7f0a00b8;
|
||||
public static final int games_menu_resend=0x7f0a00bc;
|
||||
public static final int games_menu_storedb=0x7f0a00cb;
|
||||
public static final int games_menu_study=0x7f0a009f;
|
||||
public static final int group_done=0x7f0a0092;
|
||||
public static final int group_exchange=0x7f0a00a4;
|
||||
public static final int group_hint=0x7f0a00a5;
|
||||
public static final int hideable=0x7f0a0045;
|
||||
public static final int hints_allowed=0x7f0a0037;
|
||||
public static final int invite_desc=0x7f0a0009;
|
||||
public static final int item_name=0x7f0a0075;
|
||||
public static final int item_score=0x7f0a0076;
|
||||
public static final int join_public_room_check=0x7f0a002d;
|
||||
public static final int juggle_players=0x7f0a002b;
|
||||
public static final int lang_separator=0x7f0a0025;
|
||||
public static final int lang_spinner=0x7f0a0026;
|
||||
public static final int loc_item_check=0x7f0a00cb;
|
||||
public static final int loc_item_clear=0x7f0a00ca;
|
||||
public static final int loc_item_copy_bless=0x7f0a00cd;
|
||||
public static final int loc_item_copy_eng=0x7f0a00cc;
|
||||
public static final int loc_search_button=0x7f0a0057;
|
||||
public static final int loc_search_field=0x7f0a0056;
|
||||
public static final int local_label=0x7f0a0052;
|
||||
public static final int local_name_edit=0x7f0a007a;
|
||||
public static final int local_player_set=0x7f0a006f;
|
||||
public static final int manual_add_button=0x7f0a0080;
|
||||
public static final int modtime=0x7f0a0045;
|
||||
public static final int msg_marker=0x7f0a0042;
|
||||
public static final int name=0x7f0a0081;
|
||||
public static final int item_name=0x7f0a0078;
|
||||
public static final int item_score=0x7f0a0079;
|
||||
public static final int join_public_room_check=0x7f0a002e;
|
||||
public static final int juggle_players=0x7f0a002c;
|
||||
public static final int lang_separator=0x7f0a0026;
|
||||
public static final int lang_spinner=0x7f0a0027;
|
||||
public static final int loc_item_check=0x7f0a00ce;
|
||||
public static final int loc_item_clear=0x7f0a00cd;
|
||||
public static final int loc_item_copy_bless=0x7f0a00d0;
|
||||
public static final int loc_item_copy_eng=0x7f0a00cf;
|
||||
public static final int loc_search_button=0x7f0a0058;
|
||||
public static final int loc_search_field=0x7f0a0057;
|
||||
public static final int local_label=0x7f0a0053;
|
||||
public static final int local_name_edit=0x7f0a007d;
|
||||
public static final int local_player_set=0x7f0a0072;
|
||||
public static final int main_container=0x7f0a0022;
|
||||
public static final int manual_add_button=0x7f0a0083;
|
||||
public static final int modtime=0x7f0a0046;
|
||||
public static final int msg_marker=0x7f0a0043;
|
||||
public static final int name=0x7f0a0084;
|
||||
public static final int name_edit=0x7f0a0019;
|
||||
public static final int name_label=0x7f0a007e;
|
||||
public static final int newgame_bt_config=0x7f0a006c;
|
||||
public static final int newgame_enable_bt=0x7f0a0069;
|
||||
public static final int newgame_enable_sms=0x7f0a0063;
|
||||
public static final int newgame_invite_bt=0x7f0a006b;
|
||||
public static final int newgame_invite_net=0x7f0a005f;
|
||||
public static final int newgame_invite_sms=0x7f0a0065;
|
||||
public static final int newgame_local=0x7f0a005d;
|
||||
public static final int newgame_local_config=0x7f0a005e;
|
||||
public static final int newgame_local_desc=0x7f0a005c;
|
||||
public static final int newgame_net_config=0x7f0a0060;
|
||||
public static final int newgame_sms_config=0x7f0a0066;
|
||||
public static final int nexthint_button=0x7f0a0087;
|
||||
public static final int number=0x7f0a0082;
|
||||
public static final int other_lang=0x7f0a0058;
|
||||
public static final int password_edit=0x7f0a0074;
|
||||
public static final int password_set=0x7f0a0073;
|
||||
public static final int phonies_spinner=0x7f0a003b;
|
||||
public static final int pick_faceup=0x7f0a003c;
|
||||
public static final int pick_lang=0x7f0a0083;
|
||||
public static final int pick_lang_spinner=0x7f0a0084;
|
||||
public static final int play_button=0x7f0a0023;
|
||||
public static final int player_list=0x7f0a0029;
|
||||
public static final int player_name_edit=0x7f0a0070;
|
||||
public static final int name_label=0x7f0a0081;
|
||||
public static final int newgame_bt_config=0x7f0a006f;
|
||||
public static final int newgame_enable_bt=0x7f0a006c;
|
||||
public static final int newgame_enable_sms=0x7f0a0066;
|
||||
public static final int newgame_invite_bt=0x7f0a006e;
|
||||
public static final int newgame_invite_net=0x7f0a0062;
|
||||
public static final int newgame_invite_sms=0x7f0a0068;
|
||||
public static final int newgame_local=0x7f0a0060;
|
||||
public static final int newgame_local_config=0x7f0a0061;
|
||||
public static final int newgame_local_desc=0x7f0a005f;
|
||||
public static final int newgame_net_config=0x7f0a0063;
|
||||
public static final int newgame_sms_config=0x7f0a0069;
|
||||
public static final int nexthint_button=0x7f0a008a;
|
||||
public static final int number=0x7f0a0085;
|
||||
public static final int other_lang=0x7f0a0059;
|
||||
public static final int password_edit=0x7f0a0077;
|
||||
public static final int password_set=0x7f0a0076;
|
||||
public static final int phonies_spinner=0x7f0a003c;
|
||||
public static final int pick_faceup=0x7f0a003d;
|
||||
public static final int pick_lang=0x7f0a0086;
|
||||
public static final int pick_lang_spinner=0x7f0a0087;
|
||||
public static final int play_button=0x7f0a0024;
|
||||
public static final int player_list=0x7f0a002a;
|
||||
public static final int player_name_edit=0x7f0a0073;
|
||||
public static final int players=0x7f0a0021;
|
||||
public static final int players_label=0x7f0a0028;
|
||||
public static final int prevhint_button=0x7f0a0086;
|
||||
public static final int private_rooms_set=0x7f0a002e;
|
||||
public static final int progress_bar=0x7f0a0049;
|
||||
public static final int public_rooms_set=0x7f0a0031;
|
||||
public static final int refresh_button=0x7f0a0033;
|
||||
public static final int remote_check=0x7f0a006e;
|
||||
public static final int revert_all=0x7f0a0078;
|
||||
public static final int revert_colors=0x7f0a0077;
|
||||
public static final int robot_check=0x7f0a0072;
|
||||
public static final int role=0x7f0a0047;
|
||||
public static final int room_edit=0x7f0a002f;
|
||||
public static final int room_spinner=0x7f0a0032;
|
||||
public static final int screen=0x7f0a0024;
|
||||
public static final int players_label=0x7f0a0029;
|
||||
public static final int prevhint_button=0x7f0a0089;
|
||||
public static final int private_rooms_set=0x7f0a002f;
|
||||
public static final int progress_bar=0x7f0a004a;
|
||||
public static final int public_rooms_set=0x7f0a0032;
|
||||
public static final int refresh_button=0x7f0a0034;
|
||||
public static final int remote_check=0x7f0a0071;
|
||||
public static final int revert_all=0x7f0a007b;
|
||||
public static final int revert_colors=0x7f0a007a;
|
||||
public static final int robot_check=0x7f0a0075;
|
||||
public static final int role=0x7f0a0048;
|
||||
public static final int room_edit=0x7f0a0030;
|
||||
public static final int room_spinner=0x7f0a0033;
|
||||
public static final int screen=0x7f0a0025;
|
||||
public static final int search_button=0x7f0a001d;
|
||||
public static final int seek_blue=0x7f0a0016;
|
||||
public static final int seek_green=0x7f0a0014;
|
||||
public static final int seek_red=0x7f0a0012;
|
||||
public static final int send_button=0x7f0a000f;
|
||||
public static final int show_remote=0x7f0a001a;
|
||||
public static final int shuffle_button=0x7f0a0088;
|
||||
public static final int slmenu_clear_sel=0x7f0a00d2;
|
||||
public static final int slmenu_copy_sel=0x7f0a00d1;
|
||||
public static final int slmenu_deselect_all=0x7f0a00d0;
|
||||
public static final int slmenu_lookup_sel=0x7f0a00ce;
|
||||
public static final int slmenu_select_all=0x7f0a00cf;
|
||||
public static final int smart_robot=0x7f0a003a;
|
||||
public static final int sms_disabled=0x7f0a0062;
|
||||
public static final int sms_phones=0x7f0a0035;
|
||||
public static final int sms_separator=0x7f0a0061;
|
||||
public static final int sms_stuff=0x7f0a0064;
|
||||
public static final int state=0x7f0a0046;
|
||||
public static final int summary=0x7f0a0059;
|
||||
public static final int shuffle_button=0x7f0a008b;
|
||||
public static final int slmenu_clear_sel=0x7f0a00d5;
|
||||
public static final int slmenu_copy_sel=0x7f0a00d4;
|
||||
public static final int slmenu_deselect_all=0x7f0a00d3;
|
||||
public static final int slmenu_lookup_sel=0x7f0a00d1;
|
||||
public static final int slmenu_select_all=0x7f0a00d2;
|
||||
public static final int smart_robot=0x7f0a003b;
|
||||
public static final int sms_disabled=0x7f0a0065;
|
||||
public static final int sms_phones=0x7f0a0036;
|
||||
public static final int sms_separator=0x7f0a0064;
|
||||
public static final int sms_stuff=0x7f0a0067;
|
||||
public static final int state=0x7f0a0047;
|
||||
public static final int summary=0x7f0a005a;
|
||||
public static final int tbar_parent_hor=0x7f0a0007;
|
||||
public static final int tbar_parent_vert=0x7f0a0008;
|
||||
public static final int text_item=0x7f0a004b;
|
||||
public static final int text_item2=0x7f0a004c;
|
||||
public static final int thumbnail=0x7f0a0043;
|
||||
public static final int timer_minutes_edit=0x7f0a0039;
|
||||
public static final int timer_set=0x7f0a0038;
|
||||
public static final int toolbar=0x7f0a0085;
|
||||
public static final int undo_button=0x7f0a0089;
|
||||
public static final int use_timer=0x7f0a0037;
|
||||
public static final int values_button=0x7f0a008c;
|
||||
public static final int text_item=0x7f0a004c;
|
||||
public static final int text_item2=0x7f0a004d;
|
||||
public static final int thumbnail=0x7f0a0044;
|
||||
public static final int timer_minutes_edit=0x7f0a003a;
|
||||
public static final int timer_set=0x7f0a0039;
|
||||
public static final int toolbar=0x7f0a0088;
|
||||
public static final int undo_button=0x7f0a008c;
|
||||
public static final int use_timer=0x7f0a0038;
|
||||
public static final int values_button=0x7f0a008f;
|
||||
public static final int version_string=0x7f0a0000;
|
||||
public static final int view_loaded=0x7f0a0041;
|
||||
public static final int view_unloaded=0x7f0a0040;
|
||||
public static final int view_loaded=0x7f0a0042;
|
||||
public static final int view_unloaded=0x7f0a0041;
|
||||
public static final int word_edit=0x7f0a001c;
|
||||
public static final int wordlen_max=0x7f0a001f;
|
||||
public static final int wordlen_min=0x7f0a001e;
|
||||
public static final int xlated_view=0x7f0a0054;
|
||||
public static final int xlated_view_blessed=0x7f0a0051;
|
||||
public static final int xlated_view_local=0x7f0a0053;
|
||||
public static final int zoom_button=0x7f0a008e;
|
||||
public static final int xlated_view=0x7f0a0055;
|
||||
public static final int xlated_view_blessed=0x7f0a0052;
|
||||
public static final int xlated_view_local=0x7f0a0054;
|
||||
public static final int zoom_button=0x7f0a0091;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int about_dlg=0x7f030000;
|
||||
|
@ -305,30 +308,32 @@ public final class R {
|
|||
public static final int dict_browser=0x7f03000c;
|
||||
public static final int divider_view=0x7f03000d;
|
||||
public static final int force_remote=0x7f03000e;
|
||||
public static final int game_config=0x7f03000f;
|
||||
public static final int game_list=0x7f030010;
|
||||
public static final int game_list_group=0x7f030011;
|
||||
public static final int game_list_item=0x7f030012;
|
||||
public static final int import_dict=0x7f030013;
|
||||
public static final int import_dict_item=0x7f030014;
|
||||
public static final int list_group=0x7f030015;
|
||||
public static final int list_item=0x7f030016;
|
||||
public static final int loc_item_edit=0x7f030017;
|
||||
public static final int loc_list_item=0x7f030018;
|
||||
public static final int loc_main=0x7f030019;
|
||||
public static final int lookup=0x7f03001a;
|
||||
public static final int new_game=0x7f03001b;
|
||||
public static final int passwd_view=0x7f03001c;
|
||||
public static final int player_edit=0x7f03001d;
|
||||
public static final int player_list_elem=0x7f03001e;
|
||||
public static final int prefs_w_buttons=0x7f03001f;
|
||||
public static final int relay_game_config=0x7f030020;
|
||||
public static final int remote_dict_details=0x7f030021;
|
||||
public static final int rename_game=0x7f030022;
|
||||
public static final int smsinviter=0x7f030023;
|
||||
public static final int smsinviter_item=0x7f030024;
|
||||
public static final int studylist=0x7f030025;
|
||||
public static final int toolbar=0x7f030026;
|
||||
public static final int fragact=0x7f03000f;
|
||||
public static final int game_config=0x7f030010;
|
||||
public static final int game_list=0x7f030011;
|
||||
public static final int game_list_group=0x7f030012;
|
||||
public static final int game_list_item=0x7f030013;
|
||||
public static final int import_dict=0x7f030014;
|
||||
public static final int import_dict_item=0x7f030015;
|
||||
public static final int list_group=0x7f030016;
|
||||
public static final int list_item=0x7f030017;
|
||||
public static final int loc_item_edit=0x7f030018;
|
||||
public static final int loc_list_item=0x7f030019;
|
||||
public static final int loc_main=0x7f03001a;
|
||||
public static final int lookup=0x7f03001b;
|
||||
public static final int main=0x7f03001c;
|
||||
public static final int new_game=0x7f03001d;
|
||||
public static final int passwd_view=0x7f03001e;
|
||||
public static final int player_edit=0x7f03001f;
|
||||
public static final int player_list_elem=0x7f030020;
|
||||
public static final int prefs_w_buttons=0x7f030021;
|
||||
public static final int relay_game_config=0x7f030022;
|
||||
public static final int remote_dict_details=0x7f030023;
|
||||
public static final int rename_game=0x7f030024;
|
||||
public static final int smsinviter=0x7f030025;
|
||||
public static final int smsinviter_item=0x7f030026;
|
||||
public static final int studylist=0x7f030027;
|
||||
public static final int toolbar=0x7f030028;
|
||||
}
|
||||
public static final class menu {
|
||||
public static final int board_menu=0x7f090000;
|
||||
|
@ -364,6 +369,7 @@ public final class R {
|
|||
/** Another paragraph in the about dialog
|
||||
*/
|
||||
public static final int about_web=0x7f0601e1;
|
||||
public static final int activity_button=0x7f0602c5;
|
||||
public static final int add_done_fmt=0x7f060297;
|
||||
public static final int add_to_study_fmt=0x7f06028f;
|
||||
/** Debugging stuff. No point in localizing it.
|
||||
|
@ -1070,6 +1076,7 @@ public final class R {
|
|||
always pick the first.
|
||||
*/
|
||||
public static final int forced_consistent=0x7f0600e2;
|
||||
public static final int fragment_button=0x7f0602c6;
|
||||
/** Games that have ended are listed with this string
|
||||
*/
|
||||
public static final int gameOver=0x7f060096;
|
||||
|
@ -2622,6 +2629,7 @@ public final class R {
|
|||
public static final int group_items=0x7f080006;
|
||||
public static final int relay_explain=0x7f080007;
|
||||
public static final int role_config_hint=0x7f080001;
|
||||
public static final int spaced_buttons=0x7f08000b;
|
||||
public static final int toolbar_button=0x7f080004;
|
||||
}
|
||||
public static final class xml {
|
||||
|
|
2
xwords4/android/XWords4/libs/.gitignore
vendored
Normal file
2
xwords4/android/XWords4/libs/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/armeabi
|
||||
/x86
|
BIN
xwords4/android/XWords4/libs/android-support-v13.jar
Normal file
BIN
xwords4/android/XWords4/libs/android-support-v13.jar
Normal file
Binary file not shown.
8
xwords4/android/XWords4/res/layout/fragact.xml
Normal file
8
xwords4/android/XWords4/res/layout/fragact.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_container"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
26
xwords4/android/XWords4/res/layout/main.xml
Normal file
26
xwords4/android/XWords4/res/layout/main.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="#FF000007"
|
||||
>
|
||||
<!-- probably want some explanatory text here -->
|
||||
|
||||
<LinearLayout android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FF000000"
|
||||
>
|
||||
<Button android:id="@+id/activity_button"
|
||||
android:text="@string/activity_button"
|
||||
style="@style/evenly_spaced_horizontal"
|
||||
/>
|
||||
<Button android:id="@+id/fragment_button"
|
||||
android:text="@string/fragment_button"
|
||||
style="@style/evenly_spaced_horizontal"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -2265,4 +2265,7 @@
|
|||
|
||||
<string name="force_tablet_title">Force tablet layout</string>
|
||||
<string name="force_tablet_summary">Even if my screen is too small</string>
|
||||
|
||||
<string name="activity_button">Single-pane</string>
|
||||
<string name="fragment_button">Dual-pane</string>
|
||||
</resources>
|
||||
|
|
|
@ -90,5 +90,12 @@
|
|||
<item name="android:layout_weight">1</item>
|
||||
</style>
|
||||
|
||||
<style name="spaced_buttons">
|
||||
<item name="android:layout_width">fill_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -1937,4 +1937,6 @@
|
|||
tahw\'s elbaliava.</string>
|
||||
<string name="force_tablet_title">Ecrof telbat tuoyal</string>
|
||||
<string name="force_tablet_summary">Neve fi ym neercs si oot llams</string>
|
||||
<string name="activity_button">Enap-elgnis</string>
|
||||
<string name="fragment_button">Enap-laud</string>
|
||||
</resources>
|
||||
|
|
|
@ -1937,4 +1937,6 @@
|
|||
WHAT\'S AVAILABLE.</string>
|
||||
<string name="force_tablet_title">FORCE TABLET LAYOUT</string>
|
||||
<string name="force_tablet_summary">EVEN IF MY SCREEN IS TOO SMALL</string>
|
||||
<string name="activity_button">SINGLE-PANE</string>
|
||||
<string name="fragment_button">DUAL-PANE</string>
|
||||
</resources>
|
||||
|
|
|
@ -81,6 +81,7 @@ public class BoardDelegate extends DelegateBase
|
|||
private static final String GETDICT = "GETDICT";
|
||||
|
||||
private Activity m_activity;
|
||||
private Delegator m_delegator;
|
||||
private BoardView m_view;
|
||||
private int m_jniGamePtr;
|
||||
private GameLock m_gameLock;
|
||||
|
@ -309,7 +310,7 @@ public class BoardDelegate extends DelegateBase
|
|||
|
||||
waitCloseGame( false );
|
||||
GameUtils.deleteGame( m_activity, m_rowid, false );
|
||||
finish();
|
||||
m_delegator.finish();
|
||||
}
|
||||
};
|
||||
ab.setNegativeButton( R.string.button_delete, lstnr );
|
||||
|
@ -496,6 +497,7 @@ public class BoardDelegate extends DelegateBase
|
|||
{
|
||||
super( delegator, savedInstanceState, R.menu.board_menu );
|
||||
m_activity = delegator.getActivity();
|
||||
m_delegator = delegator;
|
||||
}
|
||||
|
||||
protected void init( Bundle savedInstanceState )
|
||||
|
@ -530,17 +532,17 @@ public class BoardDelegate extends DelegateBase
|
|||
}
|
||||
m_volKeysZoom = XWPrefs.getVolKeysZoom( m_activity );
|
||||
|
||||
Intent intent = getIntent();
|
||||
m_rowid = intent.getLongExtra( GameUtils.INTENT_KEY_ROWID, -1 );
|
||||
Bundle args = getArguments();
|
||||
m_rowid = args.getLong( GameUtils.INTENT_KEY_ROWID, -1 );
|
||||
DbgUtils.logf( "BoardActivity: opening rowid %d", m_rowid );
|
||||
m_haveInvited = intent.getBooleanExtra( GameUtils.INVITED, false );
|
||||
m_haveInvited = args.getBoolean( GameUtils.INVITED, false );
|
||||
m_overNotShown = true;
|
||||
|
||||
NFCUtils.register( m_activity, this ); // Don't seem to need to unregister...
|
||||
|
||||
setBackgroundColor();
|
||||
setKeepScreenOn();
|
||||
} // onCreate
|
||||
} // init
|
||||
|
||||
protected void onPause()
|
||||
{
|
||||
|
@ -1206,7 +1208,7 @@ public class BoardDelegate extends DelegateBase
|
|||
|
||||
String msg = getString( R.string.reload_new_dict_fmt, getDict );
|
||||
showToast( msg );
|
||||
finish();
|
||||
m_delegator.finish();
|
||||
GameUtils.launchGame( m_activity, m_rowid, false );
|
||||
}
|
||||
|
||||
|
@ -1899,7 +1901,7 @@ public class BoardDelegate extends DelegateBase
|
|||
}
|
||||
} catch ( GameUtils.NoSuchGameException nsge ) {
|
||||
DbgUtils.loge( nsge );
|
||||
finish();
|
||||
m_delegator.finish();
|
||||
}
|
||||
}
|
||||
} // loadGame
|
||||
|
@ -2253,7 +2255,7 @@ public class BoardDelegate extends DelegateBase
|
|||
Intent intent = GamesListActivity.makeRematchIntent( m_activity, m_gi, m_rowid );
|
||||
if ( null != intent ) {
|
||||
startActivity( intent );
|
||||
finish();
|
||||
m_delegator.finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2014 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
||||
public class BoardFrag extends XWFragment implements Delegator {
|
||||
private BoardDelegate m_dlgt;
|
||||
|
||||
// public BoardFrag( FragActivity activity )
|
||||
// {
|
||||
// m_activity = activity;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
DbgUtils.logf( "GamesListFrag.onCreate()" );
|
||||
m_dlgt = new BoardDelegate( this, savedInstanceState );
|
||||
super.onCreate( m_dlgt, savedInstanceState );
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView( LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState )
|
||||
{
|
||||
View root = inflater.inflate( R.layout.game_list, container, false );
|
||||
LocUtils.xlateView( getActivity(), root );
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated( Bundle savedInstanceState )
|
||||
{
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
setHasOptionsMenu( true );
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.view.MenuInflater;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
@ -75,11 +76,11 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
|
|||
protected void onActivityResult( int requestCode, int resultCode,
|
||||
Intent data ) {}
|
||||
|
||||
public boolean onCreateOptionsMenu( Menu menu )
|
||||
public boolean onCreateOptionsMenu( Menu menu, MenuInflater inflater )
|
||||
{
|
||||
boolean handled = 0 < m_optionsMenuID;
|
||||
if ( handled ) {
|
||||
m_activity.getMenuInflater().inflate( m_optionsMenuID, menu );
|
||||
inflater.inflate( m_optionsMenuID, menu );
|
||||
LocUtils.xlateMenu( m_activity, menu );
|
||||
} else {
|
||||
Assert.fail();
|
||||
|
@ -88,11 +89,22 @@ public class DelegateBase implements DlgDelegate.DlgClickNotify,
|
|||
return handled;
|
||||
}
|
||||
|
||||
public boolean onCreateOptionsMenu( Menu menu )
|
||||
{
|
||||
MenuInflater inflater = m_activity.getMenuInflater();
|
||||
return onCreateOptionsMenu( menu, inflater );
|
||||
}
|
||||
|
||||
protected Intent getIntent()
|
||||
{
|
||||
return m_activity.getIntent();
|
||||
}
|
||||
|
||||
protected Bundle getArguments()
|
||||
{
|
||||
return m_delegator.getArguments();
|
||||
}
|
||||
|
||||
protected void setContentView( int resID )
|
||||
{
|
||||
m_activity.setContentView( resID );
|
||||
|
|
|
@ -20,7 +20,10 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public interface Delegator {
|
||||
Activity getActivity();
|
||||
Bundle getArguments();
|
||||
void finish();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,230 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2014 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
public class FragActivity extends FragmentActivity
|
||||
implements FragmentManager.OnBackStackChangedListener {
|
||||
|
||||
public interface OrientChangeListener {
|
||||
void orientationChanged( int orientation );
|
||||
}
|
||||
|
||||
private static FragActivity s_this;
|
||||
|
||||
private LinearLayout m_root;
|
||||
private int m_nextID = 0x00FFFFFF;
|
||||
private int m_maxPanes;
|
||||
|
||||
@Override
|
||||
public void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
s_this = this;
|
||||
super.onCreate( savedInstanceState );
|
||||
setContentView( R.layout.fragact );
|
||||
|
||||
m_root = (LinearLayout)findViewById( R.id.main_container );
|
||||
getSupportFragmentManager().addOnBackStackChangedListener( this );
|
||||
|
||||
int orientation = getResources().getConfiguration().orientation;
|
||||
m_maxPanes = maxPanes();
|
||||
|
||||
// Nothing to do if we're restarting
|
||||
if (savedInstanceState == null) {
|
||||
DbgUtils.logf( "calling new GamesListFrag()" );
|
||||
GamesListFrag glf = new GamesListFrag();
|
||||
DbgUtils.logf( "new GamesListFrag() done" );
|
||||
|
||||
// In case this activity was started with special instructions from an Intent,
|
||||
// pass the Intent's extras to the fragment as arguments
|
||||
glf.setArguments( getIntent().getExtras() );
|
||||
|
||||
DbgUtils.logf( "calling addFragment(glf)" );
|
||||
addFragment( glf );
|
||||
DbgUtils.logf( "addFragment(glf) DONE" );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed()
|
||||
{
|
||||
DbgUtils.logf( "FragActivity.onBackPressed()" );
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged( Configuration newConfig )
|
||||
{
|
||||
int orientation = newConfig.orientation;
|
||||
boolean isPortrait = orientation == Configuration.ORIENTATION_PORTRAIT;
|
||||
int maxPanes = isPortrait? 1 : 2;
|
||||
if ( m_maxPanes != maxPanes ) {
|
||||
m_maxPanes = maxPanes;
|
||||
setVisiblePanes();
|
||||
tellOrientationChanged( orientation );
|
||||
}
|
||||
super.onConfigurationChanged( newConfig );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// FragmentManager.OnBackStackChangedListener
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
public void onBackStackChanged()
|
||||
{
|
||||
DbgUtils.logf( "FragActivity.onBackStackChanged()" );
|
||||
// make sure the right-most are visible
|
||||
int fragCount = getSupportFragmentManager().getBackStackEntryCount();
|
||||
if ( 0 == fragCount ) {
|
||||
finish();
|
||||
} else if ( fragCount == m_root.getChildCount() - 1 ) {
|
||||
m_root.removeViewAt( fragCount );
|
||||
setVisiblePanes();
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// GameListDelegate.DlgtOwner
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
public static void launchGame( long rowid, boolean invited )
|
||||
{
|
||||
DbgUtils.logf( "FragActivity.launchGame(%d)", rowid );
|
||||
Bundle args = GameUtils.makeLaunchExtras( rowid, invited );
|
||||
BoardFrag bf = new BoardFrag();
|
||||
bf.setArguments( args );
|
||||
getThis().addFragment( bf );
|
||||
}
|
||||
|
||||
public void launchDictFrag( Bundle args )
|
||||
{
|
||||
// DictBrowseFrag dbf = new DictBrowseFrag();
|
||||
// dbf.setArguments( args );
|
||||
// addFragment( dbf );
|
||||
}
|
||||
|
||||
protected void popFragment( Fragment frag )
|
||||
{
|
||||
getSupportFragmentManager().popBackStack();
|
||||
}
|
||||
|
||||
protected void addFragment( Fragment fragment )
|
||||
{
|
||||
String newName = fragment.getClass().getName();
|
||||
boolean replace = false;
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
int fragCount = fm.getBackStackEntryCount();
|
||||
int contCount = m_root.getChildCount();
|
||||
DbgUtils.logf( "fragCount: %d; contCount: %d", fragCount, contCount );
|
||||
Assert.assertTrue( fragCount == contCount );
|
||||
|
||||
if ( 0 < contCount ) {
|
||||
FragmentManager.BackStackEntry entry = fm.getBackStackEntryAt( fragCount - 1 );
|
||||
String curName = entry.getName();
|
||||
DbgUtils.logf( "name of last entry: %s", curName );
|
||||
replace = curName.equals( newName );
|
||||
if ( replace ) {
|
||||
fm.popBackStack();
|
||||
}
|
||||
}
|
||||
|
||||
// Replace doesn't seem to work with generated IDs, so we'll create a
|
||||
// new FrameLayout each time. If we're replacing, we'll replace the
|
||||
// current rightmost FrameLayout. Otherwise we'll add a new one.
|
||||
FrameLayout cont = new FrameLayout( this );
|
||||
cont.setLayoutParams( new LayoutParams(0, LayoutParams.MATCH_PARENT, 1.0f) );
|
||||
int id = --m_nextID;
|
||||
cont.setId( id );
|
||||
m_root.addView( cont, replace ? contCount - 1 : contCount );
|
||||
|
||||
if ( !replace && contCount >= m_maxPanes ) {
|
||||
int indx = contCount - m_maxPanes;
|
||||
m_root.getChildAt( indx ).setVisibility( View.GONE );
|
||||
DbgUtils.logf( "hiding %dth container", indx );
|
||||
}
|
||||
|
||||
fm.beginTransaction()
|
||||
.add( id, fragment )
|
||||
.addToBackStack( newName )
|
||||
.commit();
|
||||
// fm.executePendingTransactions();
|
||||
}
|
||||
|
||||
private void setVisiblePanes()
|
||||
{
|
||||
// hide all but the right-most m_maxPanes children
|
||||
int nPanes = m_root.getChildCount();
|
||||
for ( int ii = 0; ii < nPanes; ++ii ) {
|
||||
View child = m_root.getChildAt( ii );
|
||||
boolean visible = ii >= nPanes - m_maxPanes;
|
||||
DbgUtils.logf( "pane %d: visible=%b", ii, visible );
|
||||
child.setVisibility( visible ? View.VISIBLE : View.GONE );
|
||||
}
|
||||
}
|
||||
|
||||
// Walk all Fragment children and if they care notify of change.
|
||||
private void tellOrientationChanged( int orientation )
|
||||
{
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
int nPanes = m_root.getChildCount();
|
||||
for ( int ii = 0; ii < nPanes; ++ii ) {
|
||||
FrameLayout frame = (FrameLayout)m_root.getChildAt( ii );
|
||||
int id = frame.getId();
|
||||
Fragment frag = fm.findFragmentById( id );
|
||||
if ( null == frag ) {
|
||||
DbgUtils.logf( "tellOrienationChanged: NO FRAG at %d, id=%d", ii, id );
|
||||
} else if ( frag instanceof OrientChangeListener ) {
|
||||
((OrientChangeListener)frag).orientationChanged( orientation );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int maxPanes()
|
||||
{
|
||||
int result;
|
||||
int orientation = getResources().getConfiguration().orientation;
|
||||
if ( XWPrefs.getIsTablet( this )
|
||||
&& Configuration.ORIENTATION_LANDSCAPE == orientation ) {
|
||||
result = 2;
|
||||
} else {
|
||||
result = 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static FragActivity getThis()
|
||||
{
|
||||
Assert.assertNotNull( s_this );
|
||||
return s_this;
|
||||
}
|
||||
|
||||
}
|
|
@ -27,6 +27,7 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.Rect;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
|
@ -710,14 +711,22 @@ public class GameUtils {
|
|||
return file.endsWith( XWConstants.GAME_EXTN );
|
||||
}
|
||||
|
||||
public static Bundle makeLaunchExtras( long rowid, boolean invited )
|
||||
{
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putLong( INTENT_KEY_ROWID, rowid );
|
||||
if ( invited ) {
|
||||
bundle.putBoolean( INVITED, true );
|
||||
}
|
||||
return bundle;
|
||||
}
|
||||
|
||||
public static void launchGame( Activity activity, long rowid,
|
||||
boolean invited )
|
||||
{
|
||||
Intent intent = new Intent( activity, BoardActivity.class );
|
||||
intent.putExtra( INTENT_KEY_ROWID, rowid );
|
||||
if ( invited ) {
|
||||
intent.putExtra( INVITED, true );
|
||||
}
|
||||
Bundle extras = makeLaunchExtras( rowid, invited );
|
||||
intent.putExtras( extras );
|
||||
activity.startActivity( intent );
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.eehouse.android.xw4.jni.CurGameInfo;
|
|||
|
||||
import junit.framework.Assert;
|
||||
|
||||
public class GamesListActivity extends XWListActivity {
|
||||
public class GamesListActivity extends XWListActivity implements GamesListDelegator {
|
||||
|
||||
// private static final String RELAYIDS_EXTRA = "relayids";
|
||||
private static final String ROWID_EXTRA = "rowid";
|
||||
|
@ -55,6 +55,14 @@ public class GamesListActivity extends XWListActivity {
|
|||
m_dlgt.onNewIntent( intent );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// GamesListDelegator interface
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
public void launchGame( long rowID, boolean invited )
|
||||
{
|
||||
GameUtils.launchGame( this, rowID, invited );
|
||||
}
|
||||
|
||||
public static void onGameDictDownload( Context context, Intent intent )
|
||||
{
|
||||
intent.setClass( context, GamesListActivity.class );
|
||||
|
|
|
@ -501,6 +501,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
private int m_fieldID;
|
||||
|
||||
private Activity m_activity;
|
||||
private GamesListDelegator m_delegator;
|
||||
private GameListAdapter m_adapter;
|
||||
private Handler m_handler;
|
||||
private String m_missingDict;
|
||||
|
@ -521,9 +522,10 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
private Set<Long> m_selGroupIDs;
|
||||
private String m_origTitle;
|
||||
|
||||
public GamesListDelegate( ListDelegator delegator, Bundle savedInstanceState )
|
||||
public GamesListDelegate( GamesListDelegator delegator, Bundle sis )
|
||||
{
|
||||
super( delegator, savedInstanceState, R.menu.games_list_menu );
|
||||
super( delegator, sis, R.menu.games_list_menu );
|
||||
m_delegator = delegator;
|
||||
m_activity = delegator.getActivity();
|
||||
}
|
||||
|
||||
|
@ -756,8 +758,8 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
m_selGroupIDs = new HashSet<Long>();
|
||||
getBundledData( savedInstanceState );
|
||||
|
||||
setContentView( R.layout.game_list );
|
||||
ListView listview = getListView();
|
||||
// setContentView( R.layout.game_list );
|
||||
// ListView listview = getListView();
|
||||
DBUtils.setDBChangeListener( this );
|
||||
|
||||
boolean isUpgrade = Utils.firstBootThisVersion( m_activity );
|
||||
|
@ -767,7 +769,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
}
|
||||
|
||||
mkListAdapter();
|
||||
listview.setOnItemLongClickListener( this );
|
||||
getListView().setOnItemLongClickListener( this );
|
||||
|
||||
NetUtils.informOfDeaths( m_activity );
|
||||
|
||||
|
@ -778,6 +780,13 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
m_origTitle = getTitle();
|
||||
} // init
|
||||
|
||||
// protected View onCreateView( Bundle savedInstanceState )
|
||||
// {
|
||||
// View result = inflate( R.layout.game_list );
|
||||
// // init( savedInstanceState );
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// called when we're brought to the front (probably as a result of
|
||||
// notification)
|
||||
protected void onNewIntent( Intent intent )
|
||||
|
@ -899,12 +908,14 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
public void itemClicked( SelectableItem.LongClickHandler clicked,
|
||||
GameSummary summary )
|
||||
{
|
||||
DbgUtils.logf( "GamesListDelegate.itemClicked()" );
|
||||
// We need a way to let the user get back to the basic-config
|
||||
// dialog in case it was dismissed. That way it to check for
|
||||
// an empty room name.
|
||||
if ( clicked instanceof GameListItem ) {
|
||||
if ( DBUtils.ROWID_NOTFOUND == m_launchedGame ) {
|
||||
long rowid = ((GameListItem)clicked).getRowID();
|
||||
DbgUtils.logf( "GamesListDelegate.itemClicked(%d)", rowid );
|
||||
showNotAgainDlgThen( R.string.not_again_newselect,
|
||||
R.string.key_notagain_newselect,
|
||||
Action.OPEN_GAME, rowid,
|
||||
|
@ -1046,7 +1057,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
@Override
|
||||
public boolean onPrepareOptionsMenu( Menu menu )
|
||||
{
|
||||
int nGamesSelected = m_selGames.size();
|
||||
int nGamesSelected = m_selGames.size(); // NPE!
|
||||
int nGroupsSelected = m_selGroupIDs.size();
|
||||
int groupCount = m_adapter.getGroupCount();
|
||||
m_menuPrepared = 0 == nGamesSelected || 0 == nGroupsSelected;
|
||||
|
@ -1688,7 +1699,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
long[] rowIDs = { m_missingDictRowId };
|
||||
doConfirmReset( rowIDs );
|
||||
} else {
|
||||
GameUtils.launchGame( m_activity, m_missingDictRowId );
|
||||
launchGame( m_missingDictRowId );
|
||||
}
|
||||
m_missingDictRowId = DBUtils.ROWID_NOTFOUND;
|
||||
m_missingDictMenuId = -1;
|
||||
|
@ -1698,9 +1709,10 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
|
||||
private void launchGame( long rowid, boolean invited )
|
||||
{
|
||||
DbgUtils.logf( "launchGame(%d)", rowid );
|
||||
if ( DBUtils.ROWID_NOTFOUND == m_launchedGame ) {
|
||||
m_launchedGame = rowid;
|
||||
GameUtils.launchGame( m_activity, rowid, invited );
|
||||
m_delegator.launchGame( rowid, invited );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1729,6 +1741,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
{
|
||||
GameSummary summary = (GameSummary)params[1];
|
||||
long rowid = (Long)params[0];
|
||||
DbgUtils.logf( "GamesListDelegate.doOpenGame(%d)", rowid );
|
||||
|
||||
if ( summary.conType == CommsAddrRec.CommsConnType.COMMS_CONN_RELAY
|
||||
&& summary.roomName.length() == 0 ) {
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2014 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
|
||||
public interface GamesListDelegator extends ListDelegator {
|
||||
void launchGame( long rowID, boolean invited );
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2014 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.app.Activity;
|
||||
import android.app.ListActivity;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.eehouse.android.xw4.jni.CommonPrefs;
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
||||
public class GamesListFrag extends XWListFragment implements GamesListDelegator {
|
||||
|
||||
private GamesListDelegate m_dlgt;
|
||||
|
||||
// public GamesListFrag( FragActivity activity )
|
||||
// {
|
||||
// m_activity = activity;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
DbgUtils.logf( "GamesListFrag.onCreate()" );
|
||||
m_dlgt = new GamesListDelegate( this, savedInstanceState );
|
||||
super.onCreate( m_dlgt, savedInstanceState );
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView( LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState )
|
||||
{
|
||||
View root = inflater.inflate( R.layout.game_list, container, false );
|
||||
LocUtils.xlateView( getActivity(), root );
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated( Bundle savedInstanceState )
|
||||
{
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
setHasOptionsMenu( true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// ListDelegator interface
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
public void launchGame( long rowid, boolean invited )
|
||||
{
|
||||
DbgUtils.logf( "GamesListFrag.launchGame(%d)", rowid );
|
||||
FragActivity.launchGame( rowid, invited );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2014 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.widget.Button;
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
||||
public class Main extends Activity {
|
||||
|
||||
@Override
|
||||
public void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
super.onCreate( savedInstanceState );
|
||||
setContentView( R.layout.main );
|
||||
|
||||
DbgUtils.logf( "Main.onCreate() called" );
|
||||
|
||||
Button button;
|
||||
button = (Button)findViewById( R.id.activity_button );
|
||||
button.setOnClickListener( new OnClickListener() {
|
||||
@Override
|
||||
public void onClick( View v ) {
|
||||
startActivity( GamesListActivity.class );
|
||||
}
|
||||
} );
|
||||
button = (Button)findViewById( R.id.fragment_button );
|
||||
button.setOnClickListener( new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick( View v ) {
|
||||
startActivity( FragActivity.class );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
private void startActivity( Class clazz )
|
||||
{
|
||||
startActivity( new Intent( this, clazz ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -88,4 +88,9 @@ public class PrefsActivity extends PreferenceActivity implements Delegator {
|
|||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public Bundle getArguments()
|
||||
{
|
||||
return getIntent().getExtras();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ package org.eehouse.android.xw4;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Activity;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
|
@ -144,4 +144,9 @@ public class XWActivity extends Activity implements Delegator {
|
|||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
public Bundle getArguments()
|
||||
{
|
||||
return getIntent().getExtras();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2014 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
public class XWFragment extends Fragment {
|
||||
|
||||
private DelegateBase m_dlgt;
|
||||
|
||||
public void onCreate( DelegateBase dlgt, Bundle savedInstanceState )
|
||||
{
|
||||
super.onCreate( savedInstanceState );
|
||||
m_dlgt = dlgt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated( Bundle savedInstanceState )
|
||||
{
|
||||
m_dlgt.init( savedInstanceState );
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause()
|
||||
{
|
||||
DbgUtils.logf( "%s.onPause() called", this.getClass().getName() );
|
||||
m_dlgt.onPause();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
m_dlgt.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart()
|
||||
{
|
||||
DbgUtils.logf( "%s.onStart() called", this.getClass().getName() );
|
||||
super.onStart();
|
||||
m_dlgt.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop()
|
||||
{
|
||||
DbgUtils.logf( "%s.onStop() called", this.getClass().getName() );
|
||||
m_dlgt.onStop();
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy()
|
||||
{
|
||||
m_dlgt.onDestroy();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareOptionsMenu( Menu menu )
|
||||
{
|
||||
m_dlgt.onPrepareOptionsMenu( menu );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu( Menu menu, MenuInflater inflater )
|
||||
{
|
||||
m_dlgt.onCreateOptionsMenu( menu, inflater );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected( MenuItem item )
|
||||
{
|
||||
return m_dlgt.onOptionsItemSelected( item );
|
||||
}
|
||||
|
||||
public void finish()
|
||||
{
|
||||
Assert.fail();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -146,4 +146,8 @@ public class XWListActivity extends ListActivity implements ListDelegator {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Bundle getArguments()
|
||||
{
|
||||
return getIntent().getExtras();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2014 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
public class XWListFragment extends ListFragment {
|
||||
|
||||
private ListDelegateBase m_dlgt;
|
||||
|
||||
public void onCreate( ListDelegateBase dlgt, Bundle savedInstanceState )
|
||||
{
|
||||
super.onCreate( savedInstanceState );
|
||||
m_dlgt = dlgt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated( Bundle savedInstanceState )
|
||||
{
|
||||
m_dlgt.init( savedInstanceState );
|
||||
super.onActivityCreated( savedInstanceState );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause()
|
||||
{
|
||||
m_dlgt.onPause();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
m_dlgt.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart()
|
||||
{
|
||||
super.onStart();
|
||||
m_dlgt.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop()
|
||||
{
|
||||
m_dlgt.onStop();
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy()
|
||||
{
|
||||
m_dlgt.onDestroy();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareOptionsMenu( Menu menu )
|
||||
{
|
||||
m_dlgt.onPrepareOptionsMenu( menu );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu( Menu menu, MenuInflater inflater )
|
||||
{
|
||||
m_dlgt.onCreateOptionsMenu( menu, inflater );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected( MenuItem item )
|
||||
{
|
||||
return m_dlgt.onOptionsItemSelected( item );
|
||||
}
|
||||
|
||||
public void finish()
|
||||
{
|
||||
Assert.fail();
|
||||
}
|
||||
}
|
|
@ -42,6 +42,7 @@ import org.eehouse.android.xw4.DelegateBase;
|
|||
import org.eehouse.android.xw4.Delegator;
|
||||
import org.eehouse.android.xw4.R;
|
||||
import org.eehouse.android.xw4.Utils;
|
||||
import org.eehouse.android.xw4.Delegator;
|
||||
|
||||
public class LocItemEditDelegate extends DelegateBase implements TextWatcher {
|
||||
|
||||
|
|
|
@ -49,5 +49,5 @@ esac
|
|||
ant $CMDS
|
||||
|
||||
if [ "$CMDS" != "${CMDS%%install}" ]; then
|
||||
adb shell am start -n org.eehouse.android.${PKG}/org.eehouse.android.${PKG}.GamesListActivity
|
||||
adb shell am start -n org.eehouse.android.${PKG}/org.eehouse.android.${PKG}.Main
|
||||
fi
|
||||
|
|
|
@ -67,7 +67,7 @@ for DEVICE in $DEVICES; do
|
|||
echo $DEVICE
|
||||
adb -s $DEVICE install -r $APK
|
||||
adb -s $DEVICE shell am start \
|
||||
-n org.eehouse.android.${PKG}/org.eehouse.android.${PKG}.GamesListActivity
|
||||
-n org.eehouse.android.${PKG}/org.eehouse.android.${PKG}.Main
|
||||
COUNT=$((COUNT+1))
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue