OSDN Git Service

Fix Battery page animation
authorRaff Tsai <rafftsai@google.com>
Mon, 19 Aug 2019 08:40:36 +0000 (16:40 +0800)
committerRaff Tsai <rafftsai@google.com>
Mon, 19 Aug 2019 08:47:53 +0000 (16:47 +0800)
commit648ada031d932adc73a2a521473d2c7309a16139
tree5340b8cc093c759653d903b56aeee3c2a8cb4af2
parent31c7ac10172bb3220cca837df4cfe2662c56a7b6
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
res/layout/battery_header.xml
src/com/android/settings/fuelgauge/BatteryHeaderPreferenceController.java
src/com/android/settings/fuelgauge/PowerUsageSummary.java
tests/robotests/src/com/android/settings/fuelgauge/BatteryHeaderPreferenceControllerTest.java
tests/robotests/src/com/android/settings/fuelgauge/PowerUsageSummaryTest.java