[Provider Model] Correct Wi-Fi toggle title color in Dark Theme am: 6111f53747
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15613317 Change-Id: I643fe2d2c2cb30c65f31ef0bed42d3fb526522ca
This commit is contained in:
@@ -191,6 +191,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/wifi_toggle_title"
|
||||||
android:text="@string/turn_on_wifi"
|
android:text="@string/turn_on_wifi"
|
||||||
android:textDirection="locale"
|
android:textDirection="locale"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ public class InternetDialog extends SystemUIDialog implements
|
|||||||
private LinearLayout mMobileNetworkLayout;
|
private LinearLayout mMobileNetworkLayout;
|
||||||
private LinearLayout mMobileNetworkList;
|
private LinearLayout mMobileNetworkList;
|
||||||
private LinearLayout mTurnWifiOnLayout;
|
private LinearLayout mTurnWifiOnLayout;
|
||||||
|
private TextView mWifiToggleTitleText;
|
||||||
private LinearLayout mSeeAllLayout;
|
private LinearLayout mSeeAllLayout;
|
||||||
private RecyclerView mWifiRecyclerView;
|
private RecyclerView mWifiRecyclerView;
|
||||||
private ImageView mConnectedWifiIcon;
|
private ImageView mConnectedWifiIcon;
|
||||||
@@ -215,6 +216,7 @@ public class InternetDialog extends SystemUIDialog implements
|
|||||||
mMobileNetworkLayout = mDialogView.requireViewById(R.id.mobile_network_layout);
|
mMobileNetworkLayout = mDialogView.requireViewById(R.id.mobile_network_layout);
|
||||||
mMobileNetworkList = mDialogView.requireViewById(R.id.mobile_network_list);
|
mMobileNetworkList = mDialogView.requireViewById(R.id.mobile_network_list);
|
||||||
mTurnWifiOnLayout = mDialogView.requireViewById(R.id.turn_on_wifi_layout);
|
mTurnWifiOnLayout = mDialogView.requireViewById(R.id.turn_on_wifi_layout);
|
||||||
|
mWifiToggleTitleText = mDialogView.requireViewById(R.id.wifi_toggle_title);
|
||||||
mConnectedWifListLayout = mDialogView.requireViewById(R.id.wifi_connected_layout);
|
mConnectedWifListLayout = mDialogView.requireViewById(R.id.wifi_connected_layout);
|
||||||
mConnectedWifList = mDialogView.requireViewById(R.id.wifi_connected_list);
|
mConnectedWifList = mDialogView.requireViewById(R.id.wifi_connected_list);
|
||||||
mConnectedWifiIcon = mDialogView.requireViewById(R.id.wifi_connected_icon);
|
mConnectedWifiIcon = mDialogView.requireViewById(R.id.wifi_connected_icon);
|
||||||
@@ -368,6 +370,12 @@ public class InternetDialog extends SystemUIDialog implements
|
|||||||
|
|
||||||
private void updateWifiToggle(boolean isWifiEnabled, boolean isDeviceLocked) {
|
private void updateWifiToggle(boolean isWifiEnabled, boolean isDeviceLocked) {
|
||||||
mWiFiToggle.setChecked(isWifiEnabled);
|
mWiFiToggle.setChecked(isWifiEnabled);
|
||||||
|
if (isDeviceLocked && mInternetDialogController.isNightMode()) {
|
||||||
|
int titleColor = mConnectedWifiEntry != null ? mContext.getColor(
|
||||||
|
R.color.connected_network_primary_color) : Utils.getColorAttrDefaultColor(
|
||||||
|
mContext, android.R.attr.textColorPrimary);
|
||||||
|
mWifiToggleTitleText.setTextColor(titleColor);
|
||||||
|
}
|
||||||
mTurnWifiOnLayout.setBackground(
|
mTurnWifiOnLayout.setBackground(
|
||||||
(isDeviceLocked && mConnectedWifiEntry != null) ? mBackgroundOn : null);
|
(isDeviceLocked && mConnectedWifiEntry != null) ? mBackgroundOn : null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user