mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
replace menuitem to juggle players with button; place it and add
player button below player list; remove heading above phonies, adding "phonies" to each spinner text; add "game settings" heading. Still need to find a way to make the headings pop visually.
This commit is contained in:
parent
ccd68bf3ef
commit
f78ff6786a
4 changed files with 35 additions and 30 deletions
|
@ -61,10 +61,6 @@
|
|||
android:text="@string/configure_role"
|
||||
/>
|
||||
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginLeft="20dip"
|
||||
|
@ -73,14 +69,6 @@
|
|||
android:gravity="left"
|
||||
/>
|
||||
|
||||
<Button android:id="@+id/add_player"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:text="@string/button_add_player"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- players -->
|
||||
<LinearLayout android:id="@+id/player_list"
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -88,6 +76,23 @@
|
|||
android:orientation="vertical">
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="bottom|center"
|
||||
>
|
||||
<Button android:id="@+id/add_player"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/button_add_player"
|
||||
/>
|
||||
<Button android:id="@+id/juggle_players"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/button_juggle_players"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_marginLeft="20dip"
|
||||
|
@ -101,6 +106,13 @@
|
|||
android:drawSelectorOnTop="true"
|
||||
/>
|
||||
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_marginRight="20dip"
|
||||
android:text="@string/settings_label"
|
||||
/>
|
||||
|
||||
<CheckBox android:id="@+id/hints_allowed"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -149,13 +161,6 @@
|
|||
android:text="@string/smart_robot"
|
||||
/>
|
||||
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_marginLeft="20dip"
|
||||
android:layout_marginRight="20dip"
|
||||
android:text="@string/phonies_label"
|
||||
/>
|
||||
|
||||
<Spinner android:id="@+id/phonies_spinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -4,7 +4,4 @@
|
|||
<item android:id="@+id/game_config_revert"
|
||||
android:title="@string/game_config_revert"
|
||||
/>
|
||||
<item android:id="@+id/game_config_juggle"
|
||||
android:title="@string/game_config_juggle"
|
||||
/>
|
||||
</menu>
|
||||
|
|
|
@ -147,6 +147,7 @@
|
|||
|
||||
<string name="players_label">Players</string>
|
||||
<string name="button_add_player">Add player</string>
|
||||
<string name="button_juggle_players">Juggle players</string>
|
||||
|
||||
<string name="game_config_juggle">Juggle players</string>
|
||||
|
||||
|
@ -160,7 +161,7 @@
|
|||
<string name="connect_via_label">Connect via</string>
|
||||
|
||||
<string name="configure_role">Configure connection</string>
|
||||
<string name="phonies_label">Phonies</string>
|
||||
<string name="settings_label">Game settings</string>
|
||||
<string name="minutes_label">Minutes in game</string>
|
||||
|
||||
<string name="smart_robot">Smart robot</string>
|
||||
|
@ -197,9 +198,9 @@
|
|||
<string name="role_host">Host</string>
|
||||
<string name="role_guest">Guest</string>
|
||||
|
||||
<string name="phonies_ignore">Ignore</string>
|
||||
<string name="phonies_warn">Warn</string>
|
||||
<string name="phonies_disallow">Disallow</string>
|
||||
<string name="phonies_ignore">Ignore phonies</string>
|
||||
<string name="phonies_warn">Warn if phonies</string>
|
||||
<string name="phonies_disallow">Disallow phonies</string>
|
||||
<string name="gamel_menu_prefs">Preferences</string>
|
||||
<string name="gamel_menu_dicts">Dictionaries</string>
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ public class GameConfig extends Activity implements View.OnClickListener {
|
|||
private static final int CONFIRM_CHANGE = 6;
|
||||
|
||||
private Button m_addPlayerButton;
|
||||
private Button m_jugglePlayersButton;
|
||||
private Button m_configureButton;
|
||||
private String m_path;
|
||||
private CurGameInfo m_gi;
|
||||
|
@ -361,6 +362,8 @@ public class GameConfig extends Activity implements View.OnClickListener {
|
|||
|
||||
m_addPlayerButton = (Button)findViewById(R.id.add_player);
|
||||
m_addPlayerButton.setOnClickListener( this );
|
||||
m_jugglePlayersButton = (Button)findViewById(R.id.juggle_players);
|
||||
m_jugglePlayersButton.setOnClickListener( this );
|
||||
m_configureButton = (Button)findViewById(R.id.configure_role);
|
||||
m_configureButton.setOnClickListener( this );
|
||||
|
||||
|
@ -486,10 +489,6 @@ public class GameConfig extends Activity implements View.OnClickListener {
|
|||
boolean handled = true;
|
||||
|
||||
switch( item.getItemId() ) {
|
||||
case R.id.game_config_juggle:
|
||||
m_gi.juggle();
|
||||
loadPlayers();
|
||||
break;
|
||||
case R.id.game_config_revert:
|
||||
Utils.notImpl( this );
|
||||
break;
|
||||
|
@ -507,6 +506,9 @@ public class GameConfig extends Activity implements View.OnClickListener {
|
|||
m_gi.addPlayer(); // ups nPlayers
|
||||
loadPlayers();
|
||||
}
|
||||
} else if ( m_jugglePlayersButton == view ) {
|
||||
m_gi.juggle();
|
||||
loadPlayers();
|
||||
} else if ( m_configureButton == view ) {
|
||||
int position = m_connectSpinner.getSelectedItemPosition();
|
||||
switch ( m_types[ position ] ) {
|
||||
|
|
Loading…
Reference in a new issue