Merge "[InternetDialog] Fix the inconsistent ripple effect in the internet dialog" into tm-qpr-dev am: 5f420c369a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20459276 Change-Id: I9d7b08f45c188ffab001b7daa8c6438936083056 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="?android:attr/colorControlHighlight">
|
||||||
|
<item android:id="@android:id/mask">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@android:color/white"/>
|
||||||
|
<corners android:radius="?android:attr/buttonCornerRadius"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
||||||
@@ -312,22 +312,15 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/see_all_layout"
|
android:id="@+id/see_all_layout"
|
||||||
android:layout_width="match_parent"
|
style="@style/InternetDialog.Network"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:clickable="true"
|
android:paddingStart="20dp">
|
||||||
android:focusable="true"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="center_vertical|center_horizontal"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingStart="22dp"
|
|
||||||
android:paddingEnd="22dp">
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:layout_gravity="center_vertical|start"
|
android:layout_gravity="center_vertical|start">
|
||||||
android:layout_marginStart="@dimen/internet_dialog_network_layout_margin">
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/arrow_forward"
|
android:id="@+id/arrow_forward"
|
||||||
android:src="@drawable/ic_arrow_forward"
|
android:src="@drawable/ic_arrow_forward"
|
||||||
|
|||||||
@@ -1095,7 +1095,7 @@
|
|||||||
<item name="android:orientation">horizontal</item>
|
<item name="android:orientation">horizontal</item>
|
||||||
<item name="android:focusable">true</item>
|
<item name="android:focusable">true</item>
|
||||||
<item name="android:clickable">true</item>
|
<item name="android:clickable">true</item>
|
||||||
<item name="android:background">?android:attr/selectableItemBackground</item>
|
<item name="android:background">@drawable/internet_dialog_selected_effect</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="InternetDialog.NetworkTitle">
|
<style name="InternetDialog.NetworkTitle">
|
||||||
|
|||||||
@@ -249,15 +249,7 @@ public class InternetDialog extends SystemUIDialog implements
|
|||||||
mBackgroundOn = mContext.getDrawable(R.drawable.settingslib_switch_bar_bg_on);
|
mBackgroundOn = mContext.getDrawable(R.drawable.settingslib_switch_bar_bg_on);
|
||||||
mInternetDialogTitle.setText(getDialogTitleText());
|
mInternetDialogTitle.setText(getDialogTitleText());
|
||||||
mInternetDialogTitle.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
|
mInternetDialogTitle.setGravity(Gravity.START | Gravity.CENTER_VERTICAL);
|
||||||
|
mBackgroundOff = mContext.getDrawable(R.drawable.internet_dialog_selected_effect);
|
||||||
TypedArray typedArray = mContext.obtainStyledAttributes(
|
|
||||||
new int[]{android.R.attr.selectableItemBackground});
|
|
||||||
try {
|
|
||||||
mBackgroundOff = typedArray.getDrawable(0 /* index */);
|
|
||||||
} finally {
|
|
||||||
typedArray.recycle();
|
|
||||||
}
|
|
||||||
|
|
||||||
setOnClickListener();
|
setOnClickListener();
|
||||||
mTurnWifiOnLayout.setBackground(null);
|
mTurnWifiOnLayout.setBackground(null);
|
||||||
mAirplaneModeButton.setVisibility(
|
mAirplaneModeButton.setVisibility(
|
||||||
|
|||||||
Reference in New Issue
Block a user