Files
app_Settings/res/layout/advanced_bt_entity_sub.xml
Haijie Hong 11865236b0 Update color of ring battery indicator
Test: verify the color locally
Bug: 343317785
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: I96b7775dfca51c4304b413a9a56a6489d735f748
2024-07-22 20:26:59 +08:00

102 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:focusable="true"
android:orientation="vertical">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/header_icon"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="center"
android:antialias="true"
android:background="@drawable/circle_outline"
android:padding="8dp"
android:scaleType="fitCenter" />
<com.google.android.material.progressindicator.CircularProgressIndicator
android:id="@+id/battery_ring"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="false"
app:trackColor="@android:color/transparent"
app:indicatorColor="@color/settingslib_materialColorPrimary"
app:trackThickness="4dp"
app:indicatorSize="76dp"
app:indicatorInset="0dp"
app:trackCornerRadius="2dp"
android:max="100"
android:visibility="gone" />
</FrameLayout>
<TextView
android:id="@+id/header_title"
style="@style/TextAppearance.EntityHeaderTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:ellipsize="marquee"
android:textDirection="locale"
android:layout_marginTop="24dp"
android:textSize="@dimen/advanced_bluetooth_header_title_text_size"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="33dp"
android:layout_marginTop="2dp"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/bt_battery_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/bluetooth_header_battery_content_description" />
<TextView
android:id="@+id/bt_battery_summary"
style="@style/TextAppearance.EntityHeaderSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"/>
</LinearLayout>
<TextView
android:id="@+id/bt_battery_prediction"
style="@style/TextAppearance.EntityHeaderSummary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone"/>
</LinearLayout>