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

Commit 2369167d authored by Wesley.CW Wang's avatar Wesley.CW Wang Committed by Wesley Wang
Browse files

Refine battery help message layout

 - Screenshot: https://screenshot.googleplex.com/6mdCCHYZBMNMdMG.png

Bug: 179237551
Test: make SettingsRoboTests
Change-Id: If6c569233e22ccea3213000399cdb2f5ec08f634
parent 12bc0921
Loading
Loading
Loading
Loading
+22 −20
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.
  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.
  -->
<!-- TODO(b/179237551): Refine the layout once the design been lock down. -->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
@@ -23,26 +23,28 @@
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginEnd="24dp"
        android:layout_margin="8dp"
        style="@style/ContextualCardStyle">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="top|start"
            android:orientation="vertical"
            android:padding="16dp"
            android:background="@color/homepage_emergency_background">
            android:padding="20dp"
            android:background="@color/battery_info_error_color_red">

            <ImageView
                android:id="@+id/battery_icon"
                android:src="@drawable/ic_battery_alert_24dp"
                android:src="@drawable/ic_warning_24dp"
                android:tint="@*android:color/material_red_A700"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

            <TextView android:id="@+id/summary_text"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginTop="12dp"
                      android:layout_marginBottom="16dp"
                      android:text="@string/battery_missing_message"
                      android:textAppearance="?android:attr/textAppearanceSmall"
                      android:textColor="?android:attr/textColorSecondary" />
@@ -53,7 +55,7 @@
                      android:layout_gravity="end"
                      android:text="@string/battery_missing_link_message"
                      android:textAppearance="?android:attr/textAppearanceSmall"
                      android:textColor="?android:attr/colorError" />
                      android:textColor="@*android:color/material_red_A700" />
        </LinearLayout>
    </com.google.android.material.card.MaterialCardView>
</FrameLayout>
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@
    <color name="battery_good_color_dark">#4caf50</color> <!-- Material Green 500 -->
    <color name="battery_maybe_color_dark">#fdd835</color> <!-- Material Yellow 600 -->
    <color name="battery_bad_color_dark">#f44336</color> <!-- Material Red 500 -->
    <color name="battery_info_error_color_red">#fce8e6</color> <!-- Material Red 50 -->

    <!-- TODO: Figure out colors -->
    <color name="face_anim_particle_color_1">#ff00bcd4</color> <!-- Material Cyan 500 -->