|
|
@ -118,13 +118,22 @@ public class FragmentEx extends Fragment {
|
|
|
|
super.onDestroy();
|
|
|
|
super.onDestroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void setHasOptionsMenu(boolean hasMenu) {
|
|
|
|
|
|
|
|
super.setHasOptionsMenu(!isPane() && hasMenu);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void updateSubtitle() {
|
|
|
|
private void updateSubtitle() {
|
|
|
|
AppCompatActivity activity = (AppCompatActivity) getActivity();
|
|
|
|
AppCompatActivity activity = (AppCompatActivity) getActivity();
|
|
|
|
Bundle args = getArguments();
|
|
|
|
if (activity != null && !isPane()) {
|
|
|
|
if (activity != null && (args == null || !args.getBoolean("pane"))) {
|
|
|
|
|
|
|
|
ActionBar actionbar = activity.getSupportActionBar();
|
|
|
|
ActionBar actionbar = activity.getSupportActionBar();
|
|
|
|
if (actionbar != null)
|
|
|
|
if (actionbar != null)
|
|
|
|
actionbar.setSubtitle(subtitle);
|
|
|
|
actionbar.setSubtitle(subtitle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean isPane() {
|
|
|
|
|
|
|
|
Bundle args = getArguments();
|
|
|
|
|
|
|
|
return (args != null && args.getBoolean("pane"));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|