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

Commit 3c497cc7 authored by ykhung's avatar ykhung
Browse files

Adjust Battery Saver percentage slide size (sync from ag/13330588)

Screenshots:
     https://screenshot.googleplex.com/72qRevtZXA4PTcg.png
     https://screenshot.googleplex.com/3rJjDRehdsPL8AQ.png

Bug: 157532287
Bug: 202295741
Test: make SettingsGoogleRoboTests
Merged-In: Ia4453261c22919e325a971237efc79b4887362ec
Change-Id: I09fe6fe3de6da45959ee0babbd34202340ec661d
parent 502f5361
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.
-->

<!-- Layout used by BatterySaverScheduleSeekBarController for the seekbar widget. -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginVertical="6dp"
    android:gravity="center_vertical"
    android:orientation="vertical"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

  <TextView
      android:id="@android:id/title"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:ellipsize="marquee"
      android:layout_marginStart="18dp"
      android:singleLine="true"
      android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead"
      android:textColor="?android:attr/textColorPrimary" />

  <com.android.settings.widget.DefaultIndicatorSeekBar
      android:id="@*android:id/seekbar"
      style="@android:style/Widget.Material.SeekBar.Discrete"
      android:layout_width="match_parent"
      android:layout_height="48dp"
      android:layout_marginStart="18dp"
      android:layout_marginEnd="9dp" />

</LinearLayout>
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public class BatterySaverScheduleSeekBarController implements
    public BatterySaverScheduleSeekBarController(Context context) {
        mContext = context;
        mSeekBarPreference = new SeekBarPreference(context);
        mSeekBarPreference.setLayoutResource(R.layout.preference_widget_seekbar_settings);
        mSeekBarPreference.setLayoutResource(R.layout.battery_saver_schedule_percentage_seekbar);
        mSeekBarPreference.setIconSpaceReserved(false);
        mSeekBarPreference.setOnPreferenceChangeListener(this);
        mSeekBarPreference.setContinuousUpdates(true);