mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 01:51:24 +01:00
Changed main page titles
This commit is contained in:
@@ -40,9 +40,19 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class FragmentBase extends Fragment {
|
||||
private String title = null;
|
||||
private String subtitle = " ";
|
||||
private boolean finish = false;
|
||||
|
||||
protected void setTitle(int resid) {
|
||||
setTitle(getString(resid));
|
||||
}
|
||||
|
||||
protected void setTitle(String title) {
|
||||
this.title = title;
|
||||
updateSubtitle();
|
||||
}
|
||||
|
||||
protected void setSubtitle(int resid) {
|
||||
setSubtitle(getString(resid));
|
||||
}
|
||||
@@ -182,8 +192,10 @@ public class FragmentBase extends Fragment {
|
||||
AppCompatActivity activity = (AppCompatActivity) getActivity();
|
||||
if (activity != null && !isPane()) {
|
||||
ActionBar actionbar = activity.getSupportActionBar();
|
||||
if (actionbar != null)
|
||||
if (actionbar != null) {
|
||||
actionbar.setTitle(title == null ? getString(R.string.app_name) : title);
|
||||
actionbar.setSubtitle(subtitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user