[Provider Model] Apply the latest figma of Provider Model am: d4712ff999
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15611730 Change-Id: I218a8f8ebb127b59def1dc2b90a3aca4a900a78d
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2021 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.
|
||||
-->
|
||||
|
||||
<!-- Copy of progress_indeterminate_horizontal_rect2 in frameworks/base/core/res -->
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<objectAnimator
|
||||
android:duration="2000"
|
||||
android:propertyXName="translateX"
|
||||
android:pathData="M -197.60001,0 c 14.28182,0 85.07782,0 135.54689,0 c 54.26191,0 90.42461,0 168.24331,0 c 144.72154,0 316.40982,0 316.40982,0 "
|
||||
android:interpolator="@interpolator/progress_indeterminate_horizontal_rect2_translatex_copy"
|
||||
android:repeatCount="infinite" />
|
||||
</set>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2021 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.
|
||||
-->
|
||||
|
||||
<!-- Copy of progress_indeterminate_horizontal_material_trimmed in frameworks/base/core/res -->
|
||||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:drawable="@drawable/vector_drawable_progress_indeterminate_horizontal_trimmed" >
|
||||
<target
|
||||
android:name="rect_grp"
|
||||
android:animation="@anim/progress_indeterminate_horizontal_rect" />
|
||||
</animated-vector>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2021 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.
|
||||
-->
|
||||
|
||||
<!-- Variant of vector_drawable_progress_indeterminate_horizontal in frameworks/base/core/res, which
|
||||
draws the whole height of the progress bar instead having blank space above and below the
|
||||
bar. -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||
android:height="10dp"
|
||||
android:width="340dp"
|
||||
android:viewportHeight="10"
|
||||
android:viewportWidth="340" >
|
||||
<group
|
||||
android:name="progress_group"
|
||||
android:translateX="180"
|
||||
android:translateY="5" >
|
||||
<path
|
||||
android:name="background_track"
|
||||
android:pathData="M -180.0,-5.0 l 360.0,0 l 0,10.0 l -360.0,0 Z"
|
||||
android:fillColor="?androidprv:attr/colorSurfaceVariant"/>
|
||||
<group
|
||||
android:name="rect_grp"
|
||||
android:translateX="-197.60001"
|
||||
android:scaleX="0.5" >
|
||||
<path
|
||||
android:name="rect"
|
||||
android:pathData="M -144.0,-5.0 l 288.0,0 l 0,10.0 l -288.0,0 Z"
|
||||
android:fillColor="?androidprv:attr/colorAccentPrimaryVariant" />
|
||||
</group>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||
android:id="@+id/internet_connectivity_dialog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -28,7 +29,7 @@
|
||||
style="@style/Widget.SliceView.Panel"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -46,7 +47,7 @@
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:fontFamily="google-sans"
|
||||
@@ -54,18 +55,20 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?android:attr/listDivider"/>
|
||||
android:id="@+id/divider"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:layout_width="340dp"
|
||||
android:layout_height="4dp"
|
||||
android:background="?androidprv:attr/colorSurfaceVariant"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/wifi_searching_progress"
|
||||
android:indeterminate="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="340dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="1dp"
|
||||
android:maxHeight="1dp"
|
||||
style="@*android:style/Widget.Material.ProgressBar.Horizontal"/>
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:visibility="gone"
|
||||
style="@style/TrimmedHorizontalProgressBar"/>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
@@ -93,10 +96,9 @@
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginRight="@dimen/settingslib_switchbar_margin"
|
||||
android:layout_marginLeft="@dimen/settingslib_switchbar_margin"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:paddingStart="19dp"
|
||||
android:paddingEnd="@dimen/settingslib_switchbar_padding_right">
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="22dp"
|
||||
android:paddingEnd="22dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="24dp"
|
||||
@@ -120,7 +122,7 @@
|
||||
android:gravity="start|center_vertical">
|
||||
<TextView
|
||||
android:id="@+id/mobile_title"
|
||||
android:layout_marginLeft="17dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
@@ -131,7 +133,7 @@
|
||||
android:fontFamily="google-sans"/>
|
||||
<TextView
|
||||
android:id="@+id/mobile_summary"
|
||||
android:layout_marginLeft="17dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
@@ -161,18 +163,16 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/turn_on_wifi_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="72dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginRight="@dimen/settingslib_switchbar_margin"
|
||||
android:layout_marginLeft="@dimen/settingslib_switchbar_margin"
|
||||
android:paddingStart="@dimen/settingslib_switchbar_padding_left"
|
||||
android:paddingEnd="@dimen/settingslib_switchbar_padding_right">
|
||||
android:paddingStart="22dp"
|
||||
android:paddingEnd="22dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_weight="1"
|
||||
@@ -219,8 +219,8 @@
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginRight="@dimen/settingslib_switchbar_margin"
|
||||
android:layout_marginLeft="@dimen/settingslib_switchbar_margin"
|
||||
android:paddingStart="@dimen/settingslib_switchbar_padding_left"
|
||||
android:paddingEnd="@dimen/settingslib_switchbar_padding_right">
|
||||
android:paddingStart="22dp"
|
||||
android:paddingEnd="22dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="24dp"
|
||||
@@ -301,8 +301,8 @@
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/settingslib_switchbar_padding_left"
|
||||
android:paddingEnd="@dimen/settingslib_switchbar_padding_right">
|
||||
android:paddingStart="22dp"
|
||||
android:paddingEnd="22dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="24dp"
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/settingslib_switchbar_padding_left"
|
||||
android:paddingEnd="@dimen/settingslib_switchbar_padding_right">
|
||||
android:paddingStart="22dp"
|
||||
android:paddingEnd="22dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="24dp"
|
||||
|
||||
@@ -942,4 +942,13 @@
|
||||
<item name="android:switchMinWidth">@dimen/settingslib_min_switch_width</item>
|
||||
</style>
|
||||
|
||||
<style name="TrimmedHorizontalProgressBar"
|
||||
parent="android:Widget.Material.ProgressBar.Horizontal">
|
||||
<item name="android:indeterminateDrawable">
|
||||
@drawable/progress_indeterminate_horizontal_material_trimmed
|
||||
</item>
|
||||
<item name="android:minHeight">4dp</item>
|
||||
<item name="android:maxHeight">4dp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -101,6 +101,7 @@ public class InternetDialog extends SystemUIDialog implements
|
||||
private InternetDialogController mInternetDialogController;
|
||||
private TextView mInternetDialogTitle;
|
||||
private TextView mInternetDialogSubTitle;
|
||||
private View mDivider;
|
||||
private ProgressBar mProgressBar;
|
||||
private LinearLayout mInternetListLayout;
|
||||
private LinearLayout mConnectedWifListLayout;
|
||||
@@ -205,6 +206,7 @@ public class InternetDialog extends SystemUIDialog implements
|
||||
|
||||
mInternetDialogTitle = mDialogView.requireViewById(R.id.internet_dialog_title);
|
||||
mInternetDialogSubTitle = mDialogView.requireViewById(R.id.internet_dialog_subtitle);
|
||||
mDivider = mDialogView.requireViewById(R.id.divider);
|
||||
mProgressBar = mDialogView.requireViewById(R.id.wifi_searching_progress);
|
||||
mInternetListLayout = mDialogView.requireViewById(R.id.internet_list);
|
||||
mMobileNetworkLayout = mDialogView.requireViewById(R.id.mobile_network_layout);
|
||||
@@ -438,7 +440,8 @@ public class InternetDialog extends SystemUIDialog implements
|
||||
mIsProgressBarVisible = true;
|
||||
}
|
||||
mIsProgressBarVisible = visible;
|
||||
mProgressBar.setVisibility(mIsProgressBarVisible ? View.VISIBLE : View.INVISIBLE);
|
||||
mProgressBar.setVisibility(mIsProgressBarVisible ? View.VISIBLE : View.GONE);
|
||||
mDivider.setVisibility(mIsProgressBarVisible ? View.GONE : View.VISIBLE);
|
||||
mInternetDialogSubTitle.setText(getSubtitleText());
|
||||
}
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback,
|
||||
Drawable getWifiConnectedDrawable(WifiEntry wifiEntry) throws Throwable {
|
||||
final @ColorInt int tint;
|
||||
tint = Utils.getColorAttrDefaultColor(mContext,
|
||||
com.android.internal.R.attr.colorAccentPrimaryVariant);
|
||||
com.android.internal.R.attr.colorControlNormal);
|
||||
final Drawable drawable = mContext.getDrawable(
|
||||
com.android.settingslib.Utils.getWifiIconResource(wifiEntry.getLevel()));
|
||||
drawable.setTint(tint);
|
||||
@@ -345,11 +345,6 @@ public class InternetDialogController implements WifiEntry.DisconnectCallback,
|
||||
|
||||
drawable.setTint(
|
||||
Utils.getColorAttrDefaultColor(mContext, android.R.attr.colorControlNormal));
|
||||
if (activeNetworkIsCellular()) {
|
||||
drawable.setTint(Utils.getColorAttrDefaultColor(mContext,
|
||||
com.android.internal.R.attr.colorAccentPrimaryVariant));
|
||||
}
|
||||
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user