mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-15 20:48:00 +01:00
move show(DialogFragment) to XWActivity
First of probably many bugs running new alert changes in non-dualpane-mode: Activities get to show dialogs too!
This commit is contained in:
parent
8e874fa45c
commit
f5c022bb72
3 changed files with 9 additions and 8 deletions
|
@ -437,8 +437,8 @@ public class DelegateBase implements DlgClickNotify,
|
||||||
|
|
||||||
protected void show( DialogFragment df )
|
protected void show( DialogFragment df )
|
||||||
{
|
{
|
||||||
if ( m_activity instanceof MainActivity ) {
|
if ( m_activity instanceof XWActivity ) {
|
||||||
((MainActivity)m_activity).show( df );
|
((XWActivity)m_activity).show( df );
|
||||||
} else if ( m_activity instanceof PrefsActivity ) {
|
} else if ( m_activity instanceof PrefsActivity ) {
|
||||||
((PrefsActivity)m_activity).show( df );
|
((PrefsActivity)m_activity).show( df );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -112,11 +112,6 @@ public class MainActivity extends XWActivity
|
||||||
m_dlgt.handleNewIntent( intent );
|
m_dlgt.handleNewIntent( intent );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void show( DialogFragment df )
|
|
||||||
{
|
|
||||||
df.show( getSupportFragmentManager(), "dialog" );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sometimes I'm getting crashes because views don't have fragments
|
/* Sometimes I'm getting crashes because views don't have fragments
|
||||||
* associated yet. I suspect that's because adding them's been postponed
|
* associated yet. I suspect that's because adding them's been postponed
|
||||||
* via the m_runWhenSafe mechanism. So: postpone handling intents too.
|
* via the m_runWhenSafe mechanism. So: postpone handling intents too.
|
||||||
|
|
|
@ -25,9 +25,10 @@ import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
import android.view.ContextMenu;
|
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
|
import android.view.ContextMenu;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -274,6 +275,11 @@ public class XWActivity extends FragmentActivity
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void show( DialogFragment df )
|
||||||
|
{
|
||||||
|
df.show( getSupportFragmentManager(), "dialog" );
|
||||||
|
}
|
||||||
|
|
||||||
protected Dialog makeDialog( DlgID dlgID, Object[] params )
|
protected Dialog makeDialog( DlgID dlgID, Object[] params )
|
||||||
{
|
{
|
||||||
return m_dlgt.makeDialog( dlgID, params );
|
return m_dlgt.makeDialog( dlgID, params );
|
||||||
|
|
Loading…
Add table
Reference in a new issue