Fix titles for PreferenceFragment screens
The title of PreferenceFragment screens were not being displayed
properly after rework to Settings menu. This patch fixes the issue.
Change-Id: Ic4ebf4e049b215ce4e588c9b2787072836fb5863
diff --git a/src/com/android/browser/AutoFillSettingsFragment.java b/src/com/android/browser/AutoFillSettingsFragment.java
index 5a97ede..d0ca946 100644
--- a/src/com/android/browser/AutoFillSettingsFragment.java
+++ b/src/com/android/browser/AutoFillSettingsFragment.java
@@ -20,6 +20,7 @@
import com.android.browser.R;
+import android.app.ActionBar;
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
@@ -124,6 +125,16 @@
}
@Override
+ public void onResume() {
+ super.onResume();
+ ActionBar bar = getActivity().getActionBar();
+ if (bar != null) {
+ bar.setTitle(R.string.pref_general_autofill_title);
+ bar.setDisplayHomeAsUpEnabled(false);
+ }
+ }
+
+ @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.autofill_profile_editor, menu);
mSaveMenuItem = menu.findItem(R.id.autofill_profile_editor_save_profile_menu_id);