|
|
@ -24,6 +24,7 @@ import android.view.MenuItem;
|
|
|
|
|
|
|
|
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
|
|
|
import androidx.fragment.app.FragmentTransaction;
|
|
|
|
import androidx.fragment.app.FragmentTransaction;
|
|
|
|
|
|
|
|
import androidx.lifecycle.Lifecycle;
|
|
|
|
|
|
|
|
|
|
|
|
public class ActivityCompose extends ActivityBase implements FragmentManager.OnBackStackChangedListener {
|
|
|
|
public class ActivityCompose extends ActivityBase implements FragmentManager.OnBackStackChangedListener {
|
|
|
|
static final int REQUEST_CONTACT_TO = 1;
|
|
|
|
static final int REQUEST_CONTACT_TO = 1;
|
|
|
@ -54,7 +55,8 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
|
switch (item.getItemId()) {
|
|
|
|
switch (item.getItemId()) {
|
|
|
|
case android.R.id.home:
|
|
|
|
case android.R.id.home:
|
|
|
|
getSupportFragmentManager().popBackStack();
|
|
|
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
|
|
|
|
|
|
|
getSupportFragmentManager().popBackStack();
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return super.onOptionsItemSelected(item);
|
|
|
|
return super.onOptionsItemSelected(item);
|
|
|
|