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

Commit 9be043e7 authored by tom hsu's avatar tom hsu Committed by Tom Hsu
Browse files

[Panlingual] Revamp the panlingual UI in Settings.

  - Create a Activity to contain AppLocaleDetail and
    LocalePickerWithRegion
  - Update the Entry from apps language page

Bug: 223089715
Test: local test pass
Change-Id: Id01e93f3df32412c7323ca577a149009eb1862ad
Merged-In: Id01e93f3df32412c7323ca577a149009eb1862ad
parent 6b985b36
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -851,7 +851,7 @@
        </activity>

        <activity
            android:name=".Settings$AppLocalePickerActivity"
            android:name=".localepicker.AppLocalePickerActivity"
            android:label="@string/app_locale_picker_title"
            android:exported="true" >
            <intent-filter>
@@ -859,8 +859,6 @@
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="package" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.applications.appinfo.AppLocaleDetails" />
        </activity>

        <activity
+33 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/app_locale_detail_container"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/app_locale_detail"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <FrameLayout
        android:id="@+id/app_locale_picker_with_region"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

</LinearLayout>
 No newline at end of file
+1 −15
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    android:title="@string/app_locale_picker_title">

    <com.android.settingslib.widget.LayoutPreference
        android:key="app_locale_description"
        android:layout="@layout/app_locale_details_description"
@@ -26,19 +27,4 @@
        settings:allowDividerBelow="true"
        settings:searchable="false"/>

    <PreferenceCategory
        android:key="category_key_suggested_languages"
        android:title="@string/suggested_app_locales_title" >

        <com.android.settingslib.widget.RadioButtonPreference
            android:key="system_default_locale"
            android:title="@string/preference_of_system_locale_title"
            android:order="-10000"/>

    </PreferenceCategory>

    <PreferenceCategory
        android:key="category_key_all_languages"
        android:title="@string/all_supported_app_locales_title" />

</PreferenceScreen>
+0 −2
Original line number Diff line number Diff line
@@ -108,8 +108,6 @@ public class Settings extends SettingsActivity {
    public static class InputMethodAndSubtypeEnablerActivity extends SettingsActivity { /* empty */ }
    public static class SpellCheckersSettingsActivity extends SettingsActivity { /* empty */ }
    public static class LocalePickerActivity extends SettingsActivity { /* empty */ }
    /** Activity for the App locale details settings. */
    public static class AppLocalePickerActivity extends SettingsActivity { /* empty */ }
    public static class LanguageAndInputSettingsActivity extends SettingsActivity { /* empty */ }
    public static class UserDictionarySettingsActivity extends SettingsActivity { /* empty */ }
    public static class DarkThemeSettingsActivity extends SettingsActivity { /* empty */ }
+99 −298

File changed.

Preview size limit exceeded, changes collapsed.

Loading