Added feed title to ActionBar
This commit is contained in:
parent
940e03bcc7
commit
6967e9c890
|
@ -140,8 +140,8 @@ public class FeedItemlistFragment extends ListFragment {
|
|||
@Override
|
||||
public void onHiddenChanged(boolean hidden) {
|
||||
super.onHiddenChanged(hidden);
|
||||
if (!hidden) {
|
||||
((MainActivity)getActivity()).getSupportActionBar().setTitle("");
|
||||
if (!hidden && getActivity() != null) {
|
||||
((MainActivity) getActivity()).getSupportActionBar().setTitle("");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ public class FeedSettingsFragment extends PreferenceFragmentCompat {
|
|||
.subscribe(result -> {
|
||||
feed = result;
|
||||
feedPreferences = feed.getPreferences();
|
||||
((MainActivity) getActivity()).getSupportActionBar().setSubtitle(feed.getTitle());
|
||||
|
||||
setupAutoDownloadPreference();
|
||||
setupKeepUpdatedPreference();
|
||||
|
@ -77,6 +78,15 @@ public class FeedSettingsFragment extends PreferenceFragmentCompat {
|
|||
public void onResume() {
|
||||
super.onResume();
|
||||
((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.feed_settings_label);
|
||||
if (feed != null) {
|
||||
((MainActivity) getActivity()).getSupportActionBar().setSubtitle(feed.getTitle());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
((MainActivity) getActivity()).getSupportActionBar().setSubtitle(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue