Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25a3ba4e authored by Zoey Chen's avatar Zoey Chen Committed by Android (Google) Code Review
Browse files

Merge "[Settings] Update title by UX suggestion" into main

parents ddd29468 c9d46e65
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -527,6 +527,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] -->
@@ -542,7 +544,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] -->
+6 −4
Original line number Diff line number Diff line
@@ -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) {