Remove LinearColorBar and replace uses with ProgressBar.
We never actually needed it, since progress bar can do everything we want it to. Renamed data_usage_progress to color_bar_progress to reflect its more generic state. Updated color_bar_progress to use proper values. Since we can't seem to use private attrs in settings, use the dimen/color values that are customizable. Updated usages to use regular ProgressBar APIs. Fixes: 74111937 Test: visual inspection and robotests Change-Id: I4f0c59e6cf5c629e3cc3901800d9c4afc95fa495
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2016 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.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@android:color/white"
|
||||
android:alpha="?android:attr/disabledAlpha" />
|
||||
</selector>
|
||||
@@ -16,19 +16,19 @@
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle"
|
||||
android:tint="?android:attr/colorControlActivated">
|
||||
<corners android:radius="5dp" />
|
||||
android:tint="@*android:color/config_progress_background_tint">
|
||||
<corners android:radius="@*android:dimen/config_progressBarCornerRadius" />
|
||||
<size android:height="10dp" />
|
||||
<solid android:color="@color/white_disabled" />
|
||||
<solid android:color="@*android:color/white_disabled_material" />
|
||||
</shape>
|
||||
</item>
|
||||
</item>r
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape android:shape="rectangle"
|
||||
android:tint="?android:attr/colorControlActivated">
|
||||
<corners android:radius="5dp" />
|
||||
<corners android:radius="@*android:dimen/config_progressBarCornerRadius" />
|
||||
<size android:height="10dp" />
|
||||
<solid android:color="@color/white_disabled" />
|
||||
<solid android:color="@*android:color/white_disabled_material" />
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
@@ -36,9 +36,9 @@
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape android:shape="rectangle"
|
||||
android:tint="?android:attr/colorControlActivated">
|
||||
<corners android:radius="5dp" />
|
||||
<corners android:radius="@*android:dimen/config_progressBarCornerRadius" />
|
||||
<size android:height="10dp" />
|
||||
<solid android:color="@android:color/black" />
|
||||
<solid android:color="@android:color/white" />
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
@@ -22,7 +22,7 @@
|
||||
android:thickness="@dimen/ring_progress_bar_thickness"
|
||||
android:useLevel="false"
|
||||
android:tint="?android:colorControlNormal">
|
||||
<solid android:color="@color/white_disabled" />
|
||||
<solid android:color="@*android:color/white_disabled_material" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
android:id="@+id/determinateBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:progressDrawable="@drawable/data_usage_progress"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:progressDrawable="@drawable/color_bar_progress"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/label_bar"
|
||||
|
||||
@@ -36,11 +36,12 @@
|
||||
android:gravity="left|center_vertical"
|
||||
android:text="@string/running_processes_header_title" />
|
||||
|
||||
<view class="com.android.settings.widget.LinearColorBar"
|
||||
<ProgressBar
|
||||
android:id="@+id/color_bar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="16sp"
|
||||
android:orientation="horizontal" />
|
||||
android:layout_height="wrap_content"
|
||||
android:progressDrawable="@drawable/color_bar_progress"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -42,11 +42,12 @@
|
||||
android:paddingBottom="5dp"
|
||||
android:maxLines="10" />
|
||||
|
||||
<com.android.settings.widget.LinearColorBar
|
||||
<ProgressBar
|
||||
android:id="@+id/color_bar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
/>
|
||||
android:layout_height="wrap_content"
|
||||
android:progressDrawable="@drawable/color_bar_progress"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/label_bar"
|
||||
|
||||
Reference in New Issue
Block a user