Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe15b2ec authored by LuK1337's avatar LuK1337 Committed by Bruno Martins
Browse files

SystemUI: Don't pad battery percent view when using BATTERY_STYLE_TEXT style

* Padding is unnecessary since battery icon drawable is hidden.

Change-Id: Ie23ac2cff81e27fbc30f28485f5c4902cd80cf50
parent bf65d610
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -25,6 +25,5 @@
        android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
        android:textColor="?android:attr/textColorPrimary"
        android:gravity="center_vertical|start"
        android:paddingStart="@dimen/battery_level_padding_start"
        android:importantForAccessibility="no"
        />
+7 −0
Original line number Diff line number Diff line
@@ -300,6 +300,13 @@ public class BatteryMeterView extends LinearLayout implements
                                LayoutParams.WRAP_CONTENT,
                                LayoutParams.MATCH_PARENT));
            }
            if (mBatteryStyle == BATTERY_STYLE_TEXT) {
                mBatteryPercentView.setPaddingRelative(0, 0, 0, 0);
            } else {
                Resources res = getContext().getResources();
                mBatteryPercentView.setPaddingRelative(
                        res.getDimensionPixelSize(R.dimen.battery_level_padding_start), 0, 0, 0);
            }
        } else {
            mDrawable.setShowPercent(drawPercentInside);
            if (showing) {