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

Commit 129919de authored by Xinyi Mao's avatar Xinyi Mao Committed by Android (Google) Code Review
Browse files

Merge "Update Power Anomaly UI." into main

parents 1259c523 1817f066
Loading
Loading
Loading
Loading
+238 −250

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -14,5 +14,5 @@
     limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@color/palette_list_color_yellow"/>
    <item android:color="@color/power_anomaly_app_warning_hint_color"/>
</selector>
+3 −3
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="32dp"
    android:height="32dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="@color/color_accent_selector"
        android:pathData="M7,20h4c0,1.1 -0.9,2 -2,2S7,21.1 7,20zM5,19h8v-2H5V19zM16.5,9.5c0,3.82 -2.66,5.86 -3.77,6.5H5.27C4.16,15.36 1.5,13.32 1.5,9.5C1.5,5.36 4.86,2 9,2S16.5,5.36 16.5,9.5zM14.5,9.5C14.5,6.47 12.03,4 9,4S3.5,6.47 3.5,9.5c0,2.47 1.49,3.89 2.35,4.5h6.3C13.01,13.39 14.5,11.97 14.5,9.5zM21.37,7.37L20,8l1.37,0.63L22,10l0.63,-1.37L24,8l-1.37,-0.63L22,6L21.37,7.37zM19,6l0.94,-2.06L22,3l-2.06,-0.94L19,0l-0.94,2.06L16,3l2.06,0.94L19,6z"/>
        android:pathData="M176,680Q114,643 77,580Q40,517 40,440Q40,323 121.5,241.5Q203,160 320,160Q437,160 518.5,241.5Q600,323 600,440Q600,517 563,580Q526,643 464,680L176,680ZM200,600L440,600Q478,571 499,529.5Q520,488 520,440Q520,357 461.5,298.5Q403,240 320,240Q237,240 178.5,298.5Q120,357 120,440Q120,488 141,529.5Q162,571 200,600ZM176,800L176,720L464,720L464,800L176,800ZM320,920Q287,920 263.5,896.5Q240,873 240,840L400,840Q400,873 376.5,896.5Q353,920 320,920ZM740,401Q740,326 687,273Q634,220 559,220Q634,220 687,167.5Q740,115 740,40Q740,115 792.5,167.5Q845,220 920,220Q845,220 792.5,273Q740,326 740,401ZM320,600Q320,600 320,600Q320,600 320,600Q320,600 320,600Q320,600 320,600Q320,600 320,600Q320,600 320,600Q320,600 320,600Q320,600 320,600L320,600Z"/>
</vector>
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="32dp"
    android:height="32dp"
    android:viewportWidth="24"
    android:viewportHeight="24">
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="@color/color_battery_anomaly_yellow_selector"
        android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/>
        android:fillColor="@color/color_battery_anomaly_app_warning_selector"
        android:pathData="M40,840L480,80L920,840L40,840ZM178,760L782,760L480,240L178,760ZM480,720Q497,720 508.5,708.5Q520,697 520,680Q520,663 508.5,651.5Q497,640 480,640Q463,640 451.5,651.5Q440,663 440,680Q440,697 451.5,708.5Q463,720 480,720ZM440,600L520,600L520,400L440,400L440,600ZM480,500L480,500L480,500L480,500Z"/>
</vector>
 No newline at end of file
+40 −91
Original line number Diff line number Diff line
@@ -4,23 +4,18 @@
    android:id="@+id/battery_tips_card"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

    <LinearLayout
        android:id="@+id/tips_card"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    android:layout_marginStart="?android:attr/listPreferredItemPaddingStart"
    android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
    android:background="@drawable/battery_tips_all_rounded_bg_ripple"
    android:orientation="vertical"
        android:padding="24dp">
    android:padding="20dp">

    <ImageView
        android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|start"
        android:contentDescription="@string/battery_usage_anomaly_content_description"
        android:src="@drawable/ic_battery_tips_lightbulb" />

    <TextView
@@ -29,15 +24,15 @@
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:textAlignment="viewStart"
            android:textAppearance="?android:attr/textAppearanceLarge"
        android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
        android:textColor="?android:attr/textColorPrimary" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
            android:orientation="horizontal"
        android:layout_marginTop="8dp"
            android:gravity="end">
        android:gravity="end"
        android:orientation="horizontal">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/dismiss_button"
@@ -45,68 +40,22 @@
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end|center_vertical"
                android:paddingHorizontal="16dp"
            android:layout_marginEnd="8dp"
            android:paddingHorizontal="16dp"
            android:text="@string/battery_tips_card_dismiss_button"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorPrimary" />
            android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2"
            android:textColor="@color/color_accent_selector" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/main_button"
                style="@style/Widget.Material3.Button.OutlinedButton"
                android:paddingHorizontal="16dp"
            style="@style/Widget.Material3.Button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end|center_vertical"
            android:paddingHorizontal="16dp"
            android:text="@string/battery_tips_card_action_button"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorPrimary"
                app:strokeColor="@color/color_accent_selector"
                app:strokeWidth="1dp" />
        </LinearLayout>
    </LinearLayout>

    <Space
        android:layout_width="0dp"
        android:layout_height="1dp"/>

    <LinearLayout
        android:id="@+id/feedback_card"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/battery_tips_half_rounded_bottom_bg"
        android:gravity="center_vertical|start"
        android:orientation="horizontal"
        android:paddingHorizontal="24dp"
        android:paddingVertical="16dp"
        android:visibility="gone">

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="0dp"
            android:layout_marginEnd="20dp"
            android:layout_weight="1"
            android:text="@string/battery_tips_card_feedback_info"
            android:textAlignment="viewStart"
            android:textColor="?android:attr/textColorPrimary"
            android:textStyle="bold"/>

        <ImageButton
            android:id="@+id/thumb_up"
            style="@style/Banner.Dismiss.SettingsLib"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|end"
            android:layout_marginEnd="20dp"
            android:src="@drawable/ic_battery_tips_thumb_up" />

        <ImageButton
            android:id="@+id/thumb_down"
            style="@style/Banner.Dismiss.SettingsLib"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|end"
            android:src="@drawable/ic_battery_tips_thumb_down" />
            android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2"
            android:textColor="@color/power_anomaly_primary_button_text_color"
            app:backgroundTint="@color/color_accent_selector" />
    </LinearLayout>
</LinearLayout>
 No newline at end of file
Loading