mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
clean up trade UI setup
This commit is contained in:
parent
38afc4494a
commit
83636b6736
2 changed files with 8 additions and 16 deletions
|
@ -24,6 +24,7 @@
|
|||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
>
|
||||
<Button android:id="@+id/exchange_commit"
|
||||
android:text="@string/button_trade_commit"
|
||||
|
|
|
@ -522,9 +522,13 @@ public class BoardDelegate extends DelegateBase
|
|||
m_timers = new TimerRunnable[4]; // needs to be in sync with
|
||||
// XWTimerReason
|
||||
m_view = (BoardView)findViewById( R.id.board_view );
|
||||
m_tradeButtons = findViewById( R.id.exchange_buttons );
|
||||
m_exchCommmitButton = setListenerOrHide( R.id.exchange_commit );
|
||||
m_exchCancelButton = setListenerOrHide( R.id.exchange_cancel );
|
||||
if ( ! ABUtils.haveActionBar() ) {
|
||||
m_tradeButtons = findViewById( R.id.exchange_buttons );
|
||||
m_exchCommmitButton = (Button)findViewById( R.id.exchange_commit );
|
||||
m_exchCommmitButton.setOnClickListener( this );
|
||||
m_exchCancelButton = (Button)findViewById( R.id.exchange_cancel );
|
||||
m_exchCancelButton.setOnClickListener( this );
|
||||
}
|
||||
m_volKeysZoom = XWPrefs.getVolKeysZoom( m_activity );
|
||||
|
||||
Intent intent = getIntent();
|
||||
|
@ -2243,19 +2247,6 @@ public class BoardDelegate extends DelegateBase
|
|||
}
|
||||
}
|
||||
|
||||
private Button setListenerOrHide( int id )
|
||||
{
|
||||
Button button = (Button)findViewById( id );
|
||||
if ( null != button ) {
|
||||
if ( ABUtils.haveActionBar() ) {
|
||||
button.setVisibility( View.INVISIBLE );
|
||||
} else {
|
||||
button.setOnClickListener( this );
|
||||
}
|
||||
}
|
||||
return button;
|
||||
}
|
||||
|
||||
private static void noteSkip()
|
||||
{
|
||||
String msg = "BoardActivity.feedMessage[s](): skipped because "
|
||||
|
|
Loading…
Reference in a new issue