fix finish() so it pops stack in fragment case

This commit is contained in:
Eric House 2016-03-12 15:32:53 -08:00
parent 31d01e4ef0
commit 8981765897
2 changed files with 10 additions and 1 deletions

View file

@ -223,7 +223,11 @@ public class DelegateBase implements DlgClickNotify,
protected void finish()
{
m_activity.finish();
if ( m_activity instanceof FragActivity ) {
((FragActivity)m_activity).finishFragment();
} else {
m_activity.finish();
}
}
protected String getString( int resID, Object... params )

View file

@ -124,6 +124,11 @@ public class FragActivity extends FragmentActivity
// // addFragment( dbf );
// }
protected void finishFragment()
{
popFragment( null );
}
protected void popFragment( Fragment frag )
{
getSupportFragmentManager().popBackStack();