Some where in code I add
ActionBar ab = ((AuthActivity) getActivity()).getSupportActionBar();
if (ab != null) {
ab.hide();
ab.show();
ab.setTitle(R.string.auth_tt_title);
ab.setDisplayHomeAsUpEnabled(true);
}
Later, I add fiew fragments one of which may change title and display home button.Thus, I wat to save state for ActionBar before I made changes, to be able to restore it asfter fragment will be gone. I can get title as
private String getAbStatus(AppCompatActivity activity) {
String title="";
boolean visible;
ActionBar ab = activity.getSupportActionBar();
if (ab != null) {
if (ab.getTitle() != null) title = ab.getTitle().toString();
}
return title;
}
But how can I get state of HomeAsUp?