From 8f6f70b0b767d3ced585a253c4d9e70324b40fe6 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 22 Dec 2018 12:53:07 +0100 Subject: [PATCH] Fixed multi pane subtitle --- app/src/main/java/eu/faircode/email/ActivityView.java | 1 + app/src/main/java/eu/faircode/email/FragmentEx.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index 7fead0310d..773b0f7139 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -1352,6 +1352,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB else { pane = R.id.content_pane; grpPane.setVisibility(View.VISIBLE); + args.putBoolean("pane", true); } FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); diff --git a/app/src/main/java/eu/faircode/email/FragmentEx.java b/app/src/main/java/eu/faircode/email/FragmentEx.java index aa4b1c5981..1d4ca26686 100644 --- a/app/src/main/java/eu/faircode/email/FragmentEx.java +++ b/app/src/main/java/eu/faircode/email/FragmentEx.java @@ -121,7 +121,8 @@ public class FragmentEx extends Fragment { private void updateSubtitle() { AppCompatActivity activity = (AppCompatActivity) getActivity(); - if (activity != null) { + Bundle args = getArguments(); + if (activity != null && (args == null || !args.getBoolean("pane"))) { ActionBar actionbar = activity.getSupportActionBar(); if (actionbar != null) actionbar.setSubtitle(subtitle);