|
|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
- android:layout_width="match_parent"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
android:layout_height="wrap_content"
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
|
|
|
|
@@ -21,61 +21,54 @@
|
|
|
android:id="@+id/battery_text"
|
|
|
android:layout_width="wrap_content"
|
|
|
android:layout_height="match_parent"
|
|
|
- android:gravity="center_vertical"
|
|
|
+ android:includeFontPadding="false"
|
|
|
android:maxLines="1"
|
|
|
android:ellipsize="end"
|
|
|
- android:includeFontPadding="false"
|
|
|
android:textSize="11sp"
|
|
|
android:text="@string/text"
|
|
|
- android:textStyle="bold" />
|
|
|
+ android:textStyle="bold"
|
|
|
+ app:layout_constraintStart_toEndOf="@id/arrow_icon"
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"/>
|
|
|
|
|
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/battery_text_inner"
|
|
|
android:layout_width="wrap_content"
|
|
|
android:layout_height="match_parent"
|
|
|
- android:layout_gravity="center_vertical">
|
|
|
-
|
|
|
- <TextView
|
|
|
- android:id="@+id/battery_text_inner"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginEnd="2.4dp"
|
|
|
- android:layout_marginBottom="0.8dp"
|
|
|
- android:textSize="8sp"
|
|
|
- android:text="@string/text"
|
|
|
- android:textStyle="bold"
|
|
|
- tools:ignore="SmallSp"
|
|
|
- app:layout_constraintStart_toStartOf="@id/battery_icon"
|
|
|
- app:layout_constraintEnd_toEndOf="@id/battery_icon"
|
|
|
- app:layout_constraintTop_toTopOf="@id/battery_icon"
|
|
|
- app:layout_constraintBottom_toBottomOf="@id/battery_icon"/>
|
|
|
-
|
|
|
- <ImageView
|
|
|
- android:id="@+id/battery_icon"
|
|
|
- android:layout_width="28dp"
|
|
|
- android:layout_height="12dp"
|
|
|
- android:layout_marginStart="4dp"
|
|
|
- android:scaleType="centerCrop"
|
|
|
- android:src="@drawable/ic_battery"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
- app:layout_constraintBottom_toBottomOf="parent"/>
|
|
|
+ android:layout_marginEnd="2.4dp"
|
|
|
+ android:layout_marginBottom="0.8dp"
|
|
|
+ android:textSize="8sp"
|
|
|
+ android:text="@string/text"
|
|
|
+ android:textStyle="bold"
|
|
|
+ app:layout_constraintStart_toStartOf="@id/battery_icon"
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/battery_icon"
|
|
|
+ app:layout_constraintTop_toTopOf="@id/battery_icon"
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/battery_icon"
|
|
|
+ tools:ignore="SmallSp" />
|
|
|
|
|
|
- <com.google.android.material.card.MaterialCardView
|
|
|
- android:id="@+id/battery_fill"
|
|
|
- android:layout_width="17dp"
|
|
|
- android:layout_height="8dp"
|
|
|
- android:visibility="visible"
|
|
|
- android:layout_marginStart="1.2dp"
|
|
|
- app:strokeWidth="0dp"
|
|
|
- app:cardCornerRadius="1dp"
|
|
|
- app:cardBackgroundColor="?attr/colorControlNormal"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintEnd_toEndOf="@id/battery_icon"
|
|
|
- app:layout_constraintTop_toTopOf="@id/battery_icon"
|
|
|
- app:layout_constraintBottom_toBottomOf="@id/battery_icon"/>
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/battery_icon"
|
|
|
+ android:layout_width="28dp"
|
|
|
+ android:layout_height="12dp"
|
|
|
+ android:layout_marginStart="4dp"
|
|
|
+ android:scaleType="centerCrop"
|
|
|
+ android:src="@drawable/ic_battery"
|
|
|
+ app:layout_constraintStart_toEndOf="@id/battery_text"
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"/>
|
|
|
|
|
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+ <com.google.android.material.card.MaterialCardView
|
|
|
+ android:id="@+id/battery_fill"
|
|
|
+ android:layout_width="17dp"
|
|
|
+ android:layout_height="8dp"
|
|
|
+ android:visibility="gone"
|
|
|
+ android:layout_marginStart="4.2dp"
|
|
|
+ app:strokeWidth="0dp"
|
|
|
+ app:cardCornerRadius="1dp"
|
|
|
+ app:cardBackgroundColor="?attr/colorControlNormal"
|
|
|
+ app:layout_constraintStart_toStartOf="@id/battery_icon"
|
|
|
+ app:layout_constraintTop_toTopOf="@id/battery_icon"
|
|
|
+ app:layout_constraintBottom_toBottomOf="@id/battery_icon"/>
|
|
|
|
|
|
<TextView
|
|
|
android:id="@+id/battery_text_end"
|
|
|
@@ -85,13 +78,19 @@
|
|
|
android:includeFontPadding="false"
|
|
|
android:textSize="11sp"
|
|
|
android:text="@string/text"
|
|
|
- android:textStyle="bold" />
|
|
|
+ android:textStyle="bold"
|
|
|
+ app:layout_constraintStart_toEndOf="@id/battery_icon"
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"/>
|
|
|
|
|
|
<io.legado.app.ui.widget.BatteryViewOrgin
|
|
|
android:id="@+id/battery_classic"
|
|
|
android:layout_width="wrap_content"
|
|
|
android:layout_height="wrap_content"
|
|
|
android:text="@string/text"
|
|
|
- android:visibility="visible" />
|
|
|
+ android:visibility="visible"
|
|
|
+ app:layout_constraintStart_toEndOf="@id/battery_icon"
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"/>
|
|
|
|
|
|
-</LinearLayout>
|
|
|
+</androidx.constraintlayout.widget.ConstraintLayout>
|