[Settings] Update title by UX suggestion

Bug: 377664066
Test: manual
Flag: EXEMPT refactor

Change-Id: Ic6869e614d4464bad64ec44c5973589fb997f598
This commit is contained in:
Zoey Chen
2025-02-27 06:50:05 +00:00
parent fe36b334cf
commit c9d46e6527
2 changed files with 9 additions and 5 deletions

View File

@@ -521,6 +521,8 @@
<string name="language_selection_title">Add a language</string>
<!-- Title for the region picker [CHAR LIMIT=25] -->
<string name="region_selection_title">Choose a region</string>
<!-- Title for the numbering system selection screen [CHAR LIMIT=25] -->
<string name="numbering_system_selection_title">Number System</string>
<!-- Title for the region selection screen [CHAR LIMIT=25] -->
<string name="country_selection_title">Region preference</string>
<!-- Hint text in a search edit box (used to filter long language / country lists) [CHAR LIMIT=25] -->
@@ -536,7 +538,7 @@
<!-- Message for asking to change system locale region or not. [CHAR LIMIT=50]-->
<string name="body_change_system_locale_region">Your device will keep <xliff:g id="system_language" example="English">%1$s</xliff:g> as a system language</string>
<!-- Description for the numbering system language. [CHAR LIMIT=NONE]-->
<string name="top_intro_numbering_system_title">Most apps will use your regional preferences</string>
<string name="top_intro_numbering_system_title">Choose how your device, websites, and apps display numbers</string>
<!-- Regional Preferences begin -->
<!-- The title of the menu entry of regional preferences. [CHAR LIMIT=50] -->

View File

@@ -34,6 +34,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen;
import androidx.recyclerview.widget.RecyclerView;
import com.android.internal.app.LocaleHelper;
@@ -42,7 +43,6 @@ import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.widget.TopIntroPreference;
import com.google.android.material.appbar.AppBarLayout;
@@ -75,6 +75,7 @@ public class RegionAndNumberingSystemPickerFragment extends DashboardFragment im
private static final String KEY_PREFERENCE_APP_LOCALE_SUGGESTED_LIST =
"app_locale_suggested_list";
private static final String KEY_TOP_INTRO_PREFERENCE = "top_intro_region";
private static final String KEY_PREFERENCE_SCREEN ="key_system_language_picker_page";
private static final String EXTRA_EXPAND_SEARCH_VIEW = "expand_search_view";
@Nullable
@@ -121,9 +122,10 @@ public class RegionAndNumberingSystemPickerFragment extends DashboardFragment im
}
Log.d(TAG, "onCreate, mIsNumberingMode = " + mIsNumberingMode);
if (!mIsNumberingMode) {
mActivity.setTitle(R.string.region_selection_title);
}
PreferenceScreen screen = findPreference(KEY_PREFERENCE_SCREEN);
screen.setTitle(mIsNumberingMode ? R.string.numbering_system_selection_title
: R.string.region_selection_title);
TopIntroPreference topIntroPreference = findPreference(KEY_TOP_INTRO_PREFERENCE);
if (topIntroPreference != null && mIsNumberingMode) {