reveal timer start field if timer's enabled

Rotation was hiding it once enabled.
This commit is contained in:
Eric House 2017-04-08 12:20:20 -07:00
parent 5b7559c223
commit 4668beee78

View file

@ -622,18 +622,24 @@ public class GameConfigDelegate extends DelegateBase
new OnCheckedChangeListener() { new OnCheckedChangeListener() {
public void onCheckedChanged( CompoundButton buttonView, public void onCheckedChanged( CompoundButton buttonView,
boolean checked ) { boolean checked ) {
View view = findViewById( R.id.timer_set ); showTimerSet( checked );
view.setVisibility( checked ? View.VISIBLE : View.GONE );
} }
}; };
check.setOnCheckedChangeListener( lstnr ); check.setOnCheckedChangeListener( lstnr );
setChecked( R.id.use_timer, m_gi.timerEnabled ); setChecked( R.id.use_timer, m_gi.timerEnabled );
showTimerSet( m_gi.timerEnabled );
setBoardsizeSpinner(); setBoardsizeSpinner();
} }
} }
} // loadGame } // loadGame
private void showTimerSet( boolean show )
{
View view = findViewById( R.id.timer_set );
view.setVisibility( show ? View.VISIBLE : View.GONE );
}
private void getBundledData( Bundle bundle ) private void getBundledData( Bundle bundle )
{ {
if ( null != bundle ) { if ( null != bundle ) {