This commit is contained in:
Eric House 2016-07-14 07:01:02 -07:00
parent dcb4968ed9
commit 15256ac2ad
2 changed files with 58 additions and 69 deletions

View file

@ -67,7 +67,7 @@ public class ChatDelegate extends DelegateBase {
@Override @Override
protected void init( Bundle savedInstanceState ) protected void init( Bundle savedInstanceState )
{ {
if ( BuildConstants.CHAT_SUPPORTED ) { DbgUtils.logf( "ChatDelegate.init()" );
m_edit = (EditText)findViewById( R.id.chat_edit ); m_edit = (EditText)findViewById( R.id.chat_edit );
m_edit.addTextChangedListener( new TextWatcher() { m_edit.addTextChangedListener( new TextWatcher() {
public void afterTextChanged( Editable s ) { public void afterTextChanged( Editable s ) {
@ -122,10 +122,6 @@ public class ChatDelegate extends DelegateBase {
String title = getString( R.string.chat_title_fmt, String title = getString( R.string.chat_title_fmt,
GameUtils.getName( m_activity, m_rowid ) ); GameUtils.getName( m_activity, m_rowid ) );
setTitle( title ); setTitle( title );
} else {
// Should really assert....
finish();
}
} // init } // init
@Override @Override

View file

@ -60,12 +60,12 @@ public class MainActivity extends XWActivity
protected void onCreate( Bundle savedInstanceState ) protected void onCreate( Bundle savedInstanceState )
{ {
m_dpEnabled = XWPrefs.dualpaneEnabled( this ); m_dpEnabled = XWPrefs.dualpaneEnabled( this );
if ( m_dpEnabled ) { if ( BuildConfig.DEBUG ) {
m_dlgt = new DualpaneDelegate( this, savedInstanceState ); Utils.showToast( this, "dualpane mode: " + m_dpEnabled );
Utils.showToast( this, "dualpane mode" );
} else {
m_dlgt = new GamesListDelegate( this, savedInstanceState );
} }
m_dlgt = m_dpEnabled ? new DualpaneDelegate( this, savedInstanceState )
: new GamesListDelegate( this, savedInstanceState );
super.onCreate( savedInstanceState, m_dlgt ); super.onCreate( savedInstanceState, m_dlgt );
if ( m_dpEnabled ) { if ( m_dpEnabled ) {
@ -81,13 +81,6 @@ public class MainActivity extends XWActivity
addFragmentImpl( new GamesListFrag(), getIntent().getExtras(), null ); addFragmentImpl( new GamesListFrag(), getIntent().getExtras(), null );
} }
} }
// Trying to debug situation where two of this activity are running at
// once. finish()ing when Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT is
// passed is not the fix, but perhaps there's another
// int flags = getIntent().getFlags();
// DbgUtils.logf( "MainActivity.onCreate(this=%H): flags=0x%x",
// this, flags );
} // onCreate } // onCreate
// called when we're brought to the front (probably as a result of // called when we're brought to the front (probably as a result of