Fix the title of the personal dictionary settings
Bug: 8976598 Change-Id: I9e07ff9e06449e2093b9ba8d6f28a030c69756bcmain
parent
5123427532
commit
8befd36c65
|
@ -274,4 +274,8 @@ public class UserDictionaryAddWordContents {
|
|||
localesList.add(new LocaleRenderer(activity, null)); // meaning: select another locale
|
||||
return localesList;
|
||||
}
|
||||
|
||||
public String getCurrentUserDictionaryLocale() {
|
||||
return mLocale;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ public class UserDictionaryAddWordFragment extends Fragment
|
|||
public void onActivityCreated(final Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
getActivity().getActionBar().setTitle(R.string.edit_personal_dictionary);
|
||||
// Keep the instance so that we remember mContents when configuration changes (eg rotation)
|
||||
setRetainInstance(true);
|
||||
}
|
||||
|
@ -82,6 +83,8 @@ public class UserDictionaryAddWordFragment extends Fragment
|
|||
mContents = new UserDictionaryAddWordContents(mRootView,
|
||||
mContents /* oldInstanceToBeEdited */);
|
||||
}
|
||||
getActivity().getActionBar().setSubtitle(UserDictionarySettingsUtils.getLocaleDisplayName(
|
||||
getActivity(), mContents.getCurrentUserDictionaryLocale()));
|
||||
return mRootView;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue