diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DelegateBase.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DelegateBase.java index c67b859e2..e14f858d2 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DelegateBase.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DelegateBase.java @@ -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 ) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/FragActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/FragActivity.java index 9d0c9593e..5fdbabfeb 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/FragActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/FragActivity.java @@ -124,6 +124,11 @@ public class FragActivity extends FragmentActivity // // addFragment( dbf ); // } + protected void finishFragment() + { + popFragment( null ); + } + protected void popFragment( Fragment frag ) { getSupportFragmentManager().popBackStack();