[ExpressiveBattery] Update BatteryHeaderTextPreference

- Remove background container
- Update the distance between status text and progress bar from 16dp to 10dp.

Bug: 349652542
Test: visual
Flag: EXEMPT flag by System prop
Change-Id: I1cd6f597e01daad9fbc5fb128926c8c153ff0328
This commit is contained in:
mxyyiyi
2024-11-29 13:24:51 +08:00
parent 01043fdf93
commit 1cf9ab21b8
2 changed files with 5 additions and 3 deletions

View File

@@ -18,8 +18,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginStart="?android:attr/listPreferredItemPaddingStart" android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:layout_marginTop="-6dp"
android:paddingBottom="16dp"> android:paddingBottom="16dp">
<TextView <TextView

View File

@@ -26,9 +26,10 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceViewHolder; import androidx.preference.PreferenceViewHolder;
import com.android.settings.R; import com.android.settings.R;
import com.android.settingslib.widget.GroupSectionDividerMixin;
/** A preference for battery header text. */ /** A preference for battery header text. */
public class BatteryHeaderTextPreference extends Preference { public class BatteryHeaderTextPreference extends Preference implements GroupSectionDividerMixin {
private static final String TAG = "BatteryHeaderTextPreference"; private static final String TAG = "BatteryHeaderTextPreference";
@Nullable private CharSequence mText; @Nullable private CharSequence mText;