forked from upstream-mirrors/OpenTracks
Settings: show title of section in toolbar.
This commit is contained in:
@@ -51,6 +51,12 @@ public class MainSettingsFragment extends PreferenceFragmentCompat {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
((SettingsActivity) getActivity()).getSupportActionBar().setTitle(R.string.menu_settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisplayPreferenceDialog(@NonNull Preference preference) {
|
||||
DialogFragment dialogFragment = null;
|
||||
|
||||
@@ -18,10 +18,10 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
|
||||
|
||||
public static final String EXTRAS_EXPORT_ERROR_MESSAGE = "Export error message";
|
||||
|
||||
private String exportErrorMessage = null;
|
||||
|
||||
public static final String FRAGMENT_KEY = "fragmentKey";
|
||||
|
||||
private String exportErrorMessage = null;
|
||||
|
||||
private PreferenceFragmentCompat fragment = null;
|
||||
|
||||
private SettingsBinding viewBinding;
|
||||
@@ -43,6 +43,7 @@ public class SettingsActivity extends AbstractActivity implements ChooseActivity
|
||||
}
|
||||
|
||||
setSupportActionBar(viewBinding.bottomAppBarLayout.bottomAppBar);
|
||||
setSupportActionBar(viewBinding.topAppBar);
|
||||
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.settings_fragment, fragment).commit();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/top_app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:navigationIcon="@drawable/ic_settings_24dp"
|
||||
|
||||
Reference in New Issue
Block a user