mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
replace burried launch-dict-browser menuitem with toolbar button and
newbie hint.
This commit is contained in:
parent
8db6b0bddd
commit
948def8223
6 changed files with 26 additions and 16 deletions
|
@ -44,6 +44,10 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<ImageButton android:id="@+id/dictlist_button_horizontal"
|
||||
style="@style/toolbar_button"
|
||||
android:src="@drawable/dicticon"
|
||||
/>
|
||||
<ImageButton android:id="@+id/prevhint_button_horizontal"
|
||||
style="@style/toolbar_button"
|
||||
android:src="@drawable/prev_hint"
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
android:title="@string/board_menu_game_counts" />
|
||||
<item android:id="@+id/board_menu_game_left"
|
||||
android:title="@string/board_menu_game_left" />
|
||||
<item android:id="@+id/board_menu_browse_dict"
|
||||
android:title="@string/board_menu_browse_dict" />
|
||||
<item android:id="@+id/board_menu_game_history"
|
||||
android:title="@string/board_menu_game_history" />
|
||||
<item android:id="@+id/board_menu_game_final"
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
<string name="key_notagain_newfrom">key_notagain_newfrom</string>
|
||||
<string name="key_notagain_trading">key_notagain_trading</string>
|
||||
<string name="key_na_lookup">key_na_lookup</string>
|
||||
<string name="key_na_browse">key_na_browse</string>
|
||||
|
||||
<!-- Name is not localized -->
|
||||
<string name="app_name">Crosswords</string>
|
||||
|
|
|
@ -1787,7 +1787,7 @@
|
|||
<string name="dict_browse_titlef">%1$s (%2$d words)</string>
|
||||
<string name="dict_browse_nowordsf">No word in %1$s starts with
|
||||
%2$s.</string>
|
||||
<string name="board_menu_browse_dict">Browse wordlist</string>
|
||||
<string name="not_again_browse">This button opens the wordlist
|
||||
browser on the current player\'s wordlist.</string>
|
||||
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public class BoardActivity extends XWActivity
|
|||
private static final int CHAT_ACTION = 12;
|
||||
private static final int START_TRADE_ACTION = 13;
|
||||
private static final int LOOKUP_ACTION = 14;
|
||||
private static final int BUTTON_BROWSE_ACTION = 15;
|
||||
|
||||
private static final String DLG_TITLE = "DLG_TITLE";
|
||||
private static final String DLG_TITLESTR = "DLG_TITLESTR";
|
||||
|
@ -621,11 +622,6 @@ public class BoardActivity extends XWActivity
|
|||
R.string.tiles_left_title );
|
||||
break;
|
||||
|
||||
case R.id.board_menu_browse_dict:
|
||||
String dictName = m_gi.dictName( m_view.getCurPlayer() );
|
||||
DictBrowseActivity.launch( this, dictName );
|
||||
break;
|
||||
|
||||
case R.id.board_menu_game_history:
|
||||
m_jniThread.handle( JNIThread.JNICmd.CMD_HISTORY,
|
||||
R.string.history_title );
|
||||
|
@ -697,6 +693,10 @@ public class BoardActivity extends XWActivity
|
|||
Toast.LENGTH_SHORT).show();
|
||||
m_toastStr = null;
|
||||
break;
|
||||
case BUTTON_BROWSE_ACTION:
|
||||
String dictName = m_gi.dictName( m_view.getCurPlayer() );
|
||||
DictBrowseActivity.launch( this, dictName );
|
||||
break;
|
||||
case PREV_HINT_ACTION:
|
||||
cmd = JNIThread.JNICmd.CMD_PREV_HINT;
|
||||
break;
|
||||
|
@ -1416,6 +1416,10 @@ public class BoardActivity extends XWActivity
|
|||
|
||||
private void populateToolbar()
|
||||
{
|
||||
m_toolbar.setListener( Toolbar.BUTTON_BROWSE_DICT,
|
||||
R.string.not_again_browse,
|
||||
R.string.key_na_browse,
|
||||
BUTTON_BROWSE_ACTION );
|
||||
m_toolbar.setListener( Toolbar.BUTTON_HINT_PREV,
|
||||
R.string.not_again_hintprev,
|
||||
R.string.key_notagain_hintprev,
|
||||
|
|
|
@ -39,15 +39,18 @@ public class Toolbar {
|
|||
public int m_id;
|
||||
}
|
||||
|
||||
public static final int BUTTON_HINT_PREV = 0;
|
||||
public static final int BUTTON_HINT_NEXT = 1;
|
||||
public static final int BUTTON_FLIP = 2;
|
||||
public static final int BUTTON_JUGGLE = 3;
|
||||
public static final int BUTTON_ZOOM = 4;
|
||||
public static final int BUTTON_UNDO = 5;
|
||||
public static final int BUTTON_CHAT = 6;
|
||||
public static final int BUTTON_BROWSE_DICT = 0;
|
||||
public static final int BUTTON_HINT_PREV = 1;
|
||||
public static final int BUTTON_HINT_NEXT = 2;
|
||||
public static final int BUTTON_FLIP = 3;
|
||||
public static final int BUTTON_JUGGLE = 4;
|
||||
public static final int BUTTON_ZOOM = 5;
|
||||
public static final int BUTTON_UNDO = 6;
|
||||
public static final int BUTTON_CHAT = 7;
|
||||
|
||||
private static TBButtonInfo[] s_buttonInfo = {
|
||||
// BUTTON_BROWSE_DICT
|
||||
new TBButtonInfo(R.id.dictlist_button_horizontal ),
|
||||
// BUTTON_HINT_PREV
|
||||
new TBButtonInfo(R.id.prevhint_button_horizontal ),
|
||||
// BUTTON_HINT_NEXT
|
||||
|
|
Loading…
Add table
Reference in a new issue