Files
app_Settings/res/layout/data_usage_summary_preference_expressive.xml
Weng Su 3fab5fce0c Refine the layout of mobile network data usage
- Update the progress bar to the LinearProgressIndicator style

Bug: 407474145
Flag: EXEMPT rbugfix
Test: Manual testing
  atest -c SettingsUnitTests:DataUsageSummaryPreferenceTest
Change-Id: I7ffedb7f34e0a955c918074788307c529972aef4
2025-08-02 10:53:06 +08:00

139 lines
5.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025 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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="124dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:orientation="vertical"
android:selectable="false"
style="@style/EntityHeader">
<TextView
android:id="@+id/usage_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"
android:text="@string/data_usage_title"
android:visibility="gone"/>
<com.android.settings.datausage.MeasurableLinearLayout
android:id="@+id/usage_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/settingslib_expressive_space_extrasmall4"
android:paddingBottom="3dp"
android:orientation="horizontal">
<TextView
android:id="@+id/data_usage_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@*android:string/config_headlineFontFamily"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"/>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:id="@+id/data_remaining_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@*android:string/config_headlineFontFamily"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"/>
</com.android.settings.datausage.MeasurableLinearLayout>
<com.google.android.material.progressindicator.LinearProgressIndicator
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:id="@+id/determinateBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:max="100"
android:scaleY="1"
style="@style/SettingsLibProgressBarStyle.Linear.Expressive"/>
<LinearLayout
android:id="@+id/label_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:orientation="horizontal">
<TextView
android:id="@android:id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"/>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:id="@android:id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:minHeight="54dp"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/data_limits"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"/>
<TextView
android:id="@+id/cycle_left_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"/>
<TextView
android:id="@+id/carrier_and_update"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.SettingsLib.BodyMedium"
android:textColor="@color/settingslib_materialColorOnSurface"/>
</LinearLayout>
</LinearLayout>