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

Commit 95a651ca authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed the color issue of Wi-Fi password EditText" into main

parents 8a333df6 de56c24a
Loading
Loading
Loading
Loading
+20 −24
Original line number Diff line number Diff line
@@ -17,12 +17,12 @@
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:theme="@style/Theme.Network"
    android:id="@+id/l_wifidialog"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingBottom="8dip"
    android:theme="@style/Theme.AppCompat.DayNight">
    android:paddingBottom="8dip">

    <LinearLayout android:id="@+id/wep_warning_layout"
        android:layout_width="match_parent"
@@ -58,19 +58,14 @@
                android:orientation="horizontal">
                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/ssid_layout"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    style="@style/Widget.Network.TextInputLayout.WifiConfig"
                    android:layout_weight="1"
                    android:hint="@string/wifi_ssid"
                    android:theme="@style/Theme.Settings"
                    android:textDirection="locale"
                    app:endIconMode="clear_text"
                    app:errorEnabled="true">

                    app:endIconMode="clear_text">
                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/ssid"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        style="@style/Widget.Network.TextInputLayout.WifiConfig.EditText"
                        android:inputType="textNoSuggestions"
                        android:singleLine="true"/>
                </com.google.android.material.textfield.TextInputLayout>
@@ -346,18 +341,17 @@
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      style="@style/wifi_item">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                style="@style/wifi_item_label"
                android:text="@string/wifi_password"/>

            <EditText android:id="@+id/password"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      style="@style/wifi_item_edit_content"
            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/password_input_layout"
                style="@style/Widget.Network.TextInputLayout.WifiConfig"
                android:hint="@string/wifi_password"
                app:endIconMode="password_toggle">
                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/password"
                    style="@style/Widget.Network.TextInputLayout.WifiConfig.EditText"
                    android:inputType="textPassword"
                    android:singleLine="true"/>
            </com.google.android.material.textfield.TextInputLayout>
        </LinearLayout>

        <LinearLayout android:id="@+id/show_password_layout"
@@ -368,13 +362,15 @@
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                style="@style/wifi_item_label"/>
                style="@style/wifi_item_label"
                android:visibility="gone"/>

            <CheckBox android:id="@+id/show_password"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      style="@style/wifi_item_content"
                      android:text="@string/wifi_show_password"/>
                      android:text="@string/wifi_show_password"
                      android:visibility="gone"/>
        </LinearLayout>
    </LinearLayout>

+19 −0
Original line number Diff line number Diff line
@@ -69,6 +69,25 @@
        <item name="android:scrollbarStyle">outsideOverlay</item>
    </style>

    <style name="Theme.Network" parent="@style/Theme.Material3.DynamicColors.DayNight">
        <item name="textInputStyle">@style/Widget.Network.TextInputLayout</item>
    </style>

    <style name="Widget.Network.TextInputLayout"
           parent="Widget.Material3.TextInputLayout.FilledBox"/>

    <style name="Widget.Network.TextInputLayout.WifiConfig">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:textAppearance">@android:style/TextAppearance.Material.Medium</item>
        <item name="android:textAlignment">viewStart</item>
    </style>

    <style name="Widget.Network.TextInputLayout.WifiConfig.EditText">
        <item name="android:textAppearance">@android:style/TextAppearance.Material.Body1</item>
        <item name="android:maxLength">500</item>
    </style>

    <style name="wifi_item">
        <item name="android:layout_marginTop">8dip</item>
        <item name="android:layout_marginStart">8dip</item>