mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
Fix another recycled dialog message by making superclass dismiss
listener adder available and using it.
This commit is contained in:
parent
92a726aff3
commit
81e3578dd5
2 changed files with 14 additions and 9 deletions
|
@ -146,6 +146,7 @@ public class BoardActivity extends XWActivity
|
|||
ab.setNegativeButton( R.string.button_retry, lstnr );
|
||||
}
|
||||
dialog = ab.create();
|
||||
setRemoveOnDismiss( dialog, id );
|
||||
break;
|
||||
|
||||
case DLG_DELETED:
|
||||
|
|
|
@ -69,23 +69,27 @@ public class XWActivity extends Activity {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Dialog onCreateDialog( final int id )
|
||||
protected Dialog onCreateDialog( int id )
|
||||
{
|
||||
Utils.logf( "%s.onCreateDialog() called", getClass().getName() );
|
||||
Dialog dialog = m_delegate.onCreateDialog( id );
|
||||
if ( null != dialog ) {
|
||||
dialog.
|
||||
setOnDismissListener( new DialogInterface.OnDismissListener() {
|
||||
public void onDismiss( DialogInterface di ) {
|
||||
Utils.logf( "%s.onDismiss() called",
|
||||
getClass().getName() );
|
||||
removeDialog( id );
|
||||
}
|
||||
} );
|
||||
setRemoveOnDismiss( dialog, id );
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
protected void setRemoveOnDismiss( Dialog dialog, final int id )
|
||||
{
|
||||
dialog.setOnDismissListener( new DialogInterface.OnDismissListener() {
|
||||
public void onDismiss( DialogInterface di ) {
|
||||
Utils.logf( "%s.onDismiss() called",
|
||||
getClass().getName() );
|
||||
removeDialog( id );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPrepareDialog( int id, Dialog dialog )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue