From 6a3433b67a81130e85fd80a671665fd6456f728d Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Mon, 19 Aug 2019 16:40:36 +0800 Subject: [PATCH] Fix Battery page animation TextView summary1 has default height 2 line. If the content is longer than 2 line, the TextView increases itself which causes the animation. By increasing minLines to 3, it can avoid the animation. And remove summary2 because it is only for debug purpose, the debug information can be merged to summary1. Fixes: 139554919 Test: visual, make RunSettingsRoboTests Change-Id: I167ac87c9bd83035e00d4991961599e76f4f69e1 (cherry picked from commit 648ada031d932adc73a2a521473d2c7309a16139) Merged-In: I167ac87c9bd83035e00d4991961599e76f4f69e1 --- res/layout/battery_header.xml | 8 +------- .../BatteryHeaderPreferenceController.java | 6 ------ .../settings/fuelgauge/PowerUsageSummary.java | 14 +++++--------- .../BatteryHeaderPreferenceControllerTest.java | 5 ----- .../settings/fuelgauge/PowerUsageSummaryTest.java | 5 +---- 5 files changed, 7 insertions(+), 31 deletions(-) diff --git a/res/layout/battery_header.xml b/res/layout/battery_header.xml index b3b699adc16..dca0972a79f 100644 --- a/res/layout/battery_header.xml +++ b/res/layout/battery_header.xml @@ -44,16 +44,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" - android:minLines="2" + android:minLines="3" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"/> android:textColor="?android:attr/textColorPrimary"/> - - android:textColor="?android:attr/textColorPrimary"/> listener = ArgumentCaptor.forClass(