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

Commit 0a358ba4 authored by Lei Yu's avatar Lei Yu
Browse files

Add battery illustration

Also update the VideoPreference to handle the full screen
illustration by adding attr isFullWidth and aspectRadio.

Change-Id: If2ccba4ce792801c6fd79b7c60af4e3826c091cc
Fixes: 74409022
Test: Screenshot | RunSettingsRoboTests
parent cf60ff7e
Loading
Loading
Loading
Loading
+0 −0

Empty file added.

+0 −30
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2018 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.
  -->

<!-- Entity header -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/entity_header"
    style="@style/EntityHeader"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:minHeight="200dp"
    android:paddingBottom="32dp"
    android:paddingStart="@dimen/preference_no_icon_padding_start"
    android:paddingTop="24dp">

</LinearLayout>
+2 −2
Original line number Diff line number Diff line
@@ -23,11 +23,11 @@
    android:clipToPadding="false"
    android:gravity="center"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:orientation="horizontal">

    <com.android.settings.widget.AspectRatioFrameLayout
        android:layout_width="240dp"
        android:id="@+id/video_container"
        android:layout_width="wrap_content"
        android:layout_height="240dp"
        android:padding="@dimen/gesture_animation_padding">

+0 −0

Empty file added.

+6 −8
Original line number Diff line number Diff line
@@ -21,18 +21,16 @@
    android:key="smart_battery_detail"
    android:title="@string/smart_battery_manager_title">

    <!-- TODO(b/71722498): Add header back, otherwise also remove smart_battery_header
    <com.android.settings.applications.LayoutPreference
        android:key="header_view"
        android:layout="@layout/smart_battery_header"
        android:selectable="false"
        android:order="-10000"/>
     -->
    <com.android.settings.widget.VideoPreference
        android:key="auto_awesome_battery"
        settings:animation="@raw/auto_awesome_battery"
        settings:preview="@drawable/auto_awesome_battery"/>

    <SwitchPreference
        android:key="smart_battery"
        android:title="@string/smart_battery_title"
        android:summary="@string/smart_battery_summary"/>
        android:summary="@string/smart_battery_summary"
        settings:allowDividerAbove="true"/>

    <SwitchPreference
        android:key="auto_restriction"
Loading