am 323a7aae: Merge "Fix the title of the personal dictionary settings"

* commit '323a7aae6c23cbaf7a2827a6bad2234bc084f0ce':
  Fix the title of the personal dictionary settings
main
Satoshi Kataoka 2013-07-30 01:33:48 -07:00 committed by Android Git Automerger
commit 607d35ccd8
2 changed files with 7 additions and 0 deletions

View File

@ -274,4 +274,8 @@ public class UserDictionaryAddWordContents {
localesList.add(new LocaleRenderer(activity, null)); // meaning: select another locale
return localesList;
}
public String getCurrentUserDictionaryLocale() {
return mLocale;
}
}

View File

@ -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;
}