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

Commit 007eb0da authored by Zoey Chen's avatar Zoey Chen
Browse files

[Provider Model] 1.Fix the color of the dark mode 2.Fix RTL layout

Bug: 194982368
Test: manual test
Change-Id: I912e8d21d19be0a82d7f3b3f8398808f335b42de
Merged-In: I912e8d21d19be0a82d7f3b3f8398808f335b42de
(cherry picked from commit 52829859)
parent 29aedbe5
Loading
Loading
Loading
Loading
+24 −17
Original line number Diff line number Diff line
@@ -94,8 +94,8 @@
                    android:background="?android:attr/selectableItemBackground"
                    android:layout_gravity="center_vertical|start"
                    android:orientation="horizontal"
                    android:layout_marginRight="@dimen/settingslib_switchbar_margin"
                    android:layout_marginLeft="@dimen/settingslib_switchbar_margin"
                    android:layout_marginEnd="@dimen/settingslib_switchbar_margin"
                    android:layout_marginStart="@dimen/settingslib_switchbar_margin"
                    android:layout_marginTop="16dp"
                    android:paddingStart="22dp"
                    android:paddingEnd="22dp">
@@ -107,6 +107,7 @@
                        android:layout_gravity="center_vertical|start">
                        <ImageView
                            android:id="@+id/signal_icon"
                            android:autoMirrored="true"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"/>
@@ -122,10 +123,11 @@
                        android:gravity="start|center_vertical">
                        <TextView
                            android:id="@+id/mobile_title"
                            android:layout_marginLeft="16dp"
                            android:textDirection="locale"
                            android:layout_marginStart="16dp"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_vertical"
                            android:layout_gravity="center_vertical|start"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:textColor="?android:attr/textColorPrimary"
@@ -133,10 +135,11 @@
                            android:fontFamily="google-sans"/>
                        <TextView
                            android:id="@+id/mobile_summary"
                            android:layout_marginLeft="16dp"
                            android:textDirection="locale"
                            android:layout_marginStart="16dp"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_vertical"
                            android:layout_gravity="center_vertical|start"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:textColor="?android:attr/textColorTertiary"
@@ -169,8 +172,8 @@
                    android:background="?android:attr/selectableItemBackground"
                    android:gravity="center"
                    android:orientation="horizontal"
                    android:layout_marginRight="@dimen/settingslib_switchbar_margin"
                    android:layout_marginLeft="@dimen/settingslib_switchbar_margin"
                    android:layout_marginEnd="@dimen/settingslib_switchbar_margin"
                    android:layout_marginStart="@dimen/settingslib_switchbar_margin"
                    android:paddingStart="22dp"
                    android:paddingEnd="22dp">

@@ -182,6 +185,7 @@
                        android:layout_height="match_parent">
                        <TextView
                            android:text="@string/turn_on_wifi"
                            android:textDirection="locale"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:gravity="start|center_vertical"
@@ -217,8 +221,8 @@
                    android:visibility="gone"
                    android:background="?android:attr/selectableItemBackground"
                    android:orientation="horizontal"
                    android:layout_marginRight="@dimen/settingslib_switchbar_margin"
                    android:layout_marginLeft="@dimen/settingslib_switchbar_margin"
                    android:layout_marginEnd="@dimen/settingslib_switchbar_margin"
                    android:layout_marginStart="@dimen/settingslib_switchbar_margin"
                    android:paddingStart="22dp"
                    android:paddingEnd="22dp">

@@ -244,10 +248,11 @@
                        android:gravity="start|center_vertical">
                        <TextView
                            android:id="@+id/wifi_connected_title"
                            android:textDirection="locale"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_vertical"
                            android:layout_marginLeft="16dp"
                            android:layout_gravity="center_vertical|start"
                            android:layout_marginStart="16dp"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:textColor="?android:attr/textColorPrimary"
@@ -255,10 +260,11 @@
                            android:fontFamily="google-sans"/>
                        <TextView
                            android:id="@+id/wifi_connected_summary"
                            android:textDirection="locale"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_vertical"
                            android:layout_marginLeft="16dp"
                            android:layout_gravity="center_vertical|start"
                            android:layout_marginStart="16dp"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:textColor="?android:attr/textColorTertiary"
@@ -269,7 +275,7 @@
                    <FrameLayout
                        android:layout_width="24dp"
                        android:layout_height="match_parent"
                        android:layout_marginRight="5dp"
                        android:layout_marginEnd="5dp"
                        android:clickable="false"
                        android:gravity="center">
                        <ImageView
@@ -323,9 +329,10 @@
                    android:clickable="false"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="16dp">
                    android:layout_marginStart="16dp">
                    <TextView
                        android:text="@string/see_all_networks"
                        android:textDirection="locale"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="start|center_vertical"
@@ -353,7 +360,7 @@
                    android:id="@+id/done"
                    android:layout_width="60dp"
                    android:layout_height="30dp"
                    android:layout_marginRight="24dp"
                    android:layout_marginEnd="24dp"
                    android:layout_gravity="end"
                    android:background="@drawable/internet_dialog_footer_background"
                    android:textColor="?android:attr/textColorPrimary"
+7 −5
Original line number Diff line number Diff line
@@ -56,12 +56,13 @@
            android:layout_height="72dp">
            <TextView
                android:id="@+id/wifi_title"
                android:textDirection="locale"
                android:layout_weight="1"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:layout_gravity="center_vertical"
                android:layout_gravity="center_vertical|start"
                android:gravity="start|center_vertical"
                android:layout_marginLeft="16dp"
                android:layout_marginStart="16dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="?android:attr/textColorPrimary"
@@ -69,12 +70,13 @@
                android:fontFamily="google-sans"/>
            <TextView
                android:id="@+id/wifi_summary"
                android:textDirection="locale"
                android:layout_weight="1"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:layout_gravity="center_vertical"
                android:layout_gravity="center_vertical|start"
                android:gravity="start|center_vertical"
                android:layout_marginLeft="16dp"
                android:layout_marginStart="16dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="?android:attr/textColorSecondary"
@@ -85,7 +87,7 @@
        <FrameLayout
            android:layout_width="24dp"
            android:layout_height="match_parent"
            android:layout_marginRight="@dimen/settingslib_switchbar_padding_right"
            android:layout_marginEnd="@dimen/settingslib_switchbar_padding_right"
            android:clickable="false"
            android:gravity="center">
            <ImageView
+2 −2
Original line number Diff line number Diff line
@@ -291,6 +291,6 @@
    <color name="settingslib_track_on_color">?androidprv:attr/colorAccentPrimaryVariant</color>
    <!-- Material next track off color-->
    <color name="settingslib_track_off_color">?androidprv:attr/colorAccentSecondaryVariant</color>
    <color name="connected_network_primary_color">#ff000000</color>
    <color name="connected_network_tertiary_color">#808080</color>
    <color name="connected_network_primary_color">#191C18</color>
    <color name="connected_network_secondary_color">#41493D</color>
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ public class InternetAdapter extends RecyclerView.Adapter<InternetAdapter.Intern
                return null;
            }
            drawable.setTint(
                    Utils.getColorAttrDefaultColor(mContext, android.R.attr.colorControlNormal));
                    Utils.getColorAttrDefaultColor(mContext, android.R.attr.textColorTertiary));
            final AtomicReference<Drawable> shared = new AtomicReference<>();
            shared.set(drawable);
            return shared.get();
+17 −12
Original line number Diff line number Diff line
@@ -341,14 +341,17 @@ public class InternetDialog extends SystemUIDialog implements
                mMobileSummaryText.setVisibility(View.GONE);
            }
            mSignalIcon.setImageDrawable(getSignalStrengthDrawable());
            if (mInternetDialogController.isNightMode()) {
                int titleColor = isCellularNetwork ? mContext.getColor(
                        R.color.connected_network_primary_color) : Utils.getColorAttrDefaultColor(
                        mContext, android.R.attr.textColorPrimary);
                int summaryColor = isCellularNetwork ? mContext.getColor(
                    R.color.connected_network_tertiary_color) : Utils.getColorAttrDefaultColor(
                    mContext, android.R.attr.textColorTertiary);
                        R.color.connected_network_secondary_color) : Utils.getColorAttrDefaultColor(
                        mContext, android.R.attr.textColorSecondary);

                mMobileTitleText.setTextColor(titleColor);
                mMobileSummaryText.setTextColor(summaryColor);
            }
            mMobileNetworkLayout.setBackground(isCellularNetwork ? mBackgroundOn : null);

            mMobileDataToggle.setVisibility(mCanConfigMobileData ? View.VISIBLE : View.INVISIBLE);
@@ -366,10 +369,12 @@ public class InternetDialog extends SystemUIDialog implements
        mConnectedWifiSummaryText.setText(getConnectedWifiSummary());
        mConnectedWifiIcon.setImageDrawable(
                mInternetDialogController.getConnectedWifiDrawable(mConnectedWifiEntry));
        if (mInternetDialogController.isNightMode()) {
            mConnectedWifiTitleText.setTextColor(
                    mContext.getColor(R.color.connected_network_primary_color));
            mConnectedWifiSummaryText.setTextColor(
                mContext.getColor(R.color.connected_network_tertiary_color));
                    mContext.getColor(R.color.connected_network_secondary_color));
        }
        mWifiSettingsIcon.setColorFilter(
                mContext.getColor(R.color.connected_network_primary_color));
        mConnectedWifListLayout.setBackground(mBackgroundOn);
Loading