Add ring indicator for battery level
Bug: 343317785 Test: atest AdvancedBluetoothDetailsHeaderControllerTest Flag: com.android.settings.flags.enable_bluetooth_device_details_polish Change-Id: Ib657db60be8d377ea990674c4d2438ea8a6854d0
This commit is contained in:
@@ -17,21 +17,43 @@
|
||||
|
||||
<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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/header_icon"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:antialias="true"
|
||||
android:background="@drawable/circle_outline"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitCenter"/>
|
||||
<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/bluetooth_battery_ring_indicator_color"
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user