mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-19 08:20:15 +00:00
Added dynamic action bar titles in settings
This commit is contained in:
parent
b37a2eca3b
commit
5a7e5cf506
3 changed files with 32 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
package org.dslul.openboard.inputmethod.latin.settings;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -107,6 +108,15 @@ public final class CustomInputStyleSettingsFragment extends PreferenceFragment
|
|||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
final ActionBar actionBar = getActivity().getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setTitle(R.string.custom_input_styles_title);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
|
||||
final Bundle savedInstanceState) {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package org.dslul.openboard.inputmethod.latin.settings;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
|
@ -58,6 +59,16 @@ public final class SettingsFragment extends InputMethodSettingsFragment {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
final ActionBar actionBar = getActivity().getActionBar();
|
||||
final CharSequence screenTitle = getPreferenceScreen().getTitle();
|
||||
if (actionBar != null && screenTitle != null) {
|
||||
actionBar.setTitle(screenTitle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
|
||||
if (FeedbackUtils.isHelpAndFeedbackFormSupported()) {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package org.dslul.openboard.inputmethod.latin.settings;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.backup.BackupManager;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
@ -131,6 +132,16 @@ public abstract class SubScreenFragment extends PreferenceFragment
|
|||
mSharedPreferenceChangeListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
final ActionBar actionBar = getActivity().getActionBar();
|
||||
final CharSequence screenTitle = getPreferenceScreen().getTitle();
|
||||
if (actionBar != null && screenTitle != null) {
|
||||
actionBar.setTitle(screenTitle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
getSharedPreferences().unregisterOnSharedPreferenceChangeListener(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue