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
This commit is contained in:
@@ -55,8 +55,6 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
|
||||
TextView mBatteryPercentText;
|
||||
@VisibleForTesting
|
||||
TextView mSummary1;
|
||||
@VisibleForTesting
|
||||
TextView mSummary2;
|
||||
|
||||
private Activity mActivity;
|
||||
private PreferenceFragmentCompat mHost;
|
||||
@@ -90,7 +88,6 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
|
||||
.findViewById(R.id.battery_header_icon);
|
||||
mBatteryPercentText = mBatteryLayoutPref.findViewById(R.id.battery_percent);
|
||||
mSummary1 = mBatteryLayoutPref.findViewById(R.id.summary1);
|
||||
mSummary2 = mBatteryLayoutPref.findViewById(R.id.summary2);
|
||||
|
||||
quickUpdateHeaderPreference();
|
||||
}
|
||||
@@ -115,9 +112,6 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
|
||||
} else {
|
||||
mSummary1.setText(info.remainingLabel);
|
||||
}
|
||||
// Clear this just to be sure we don't get UI jank on re-entering this view from another
|
||||
// activity.
|
||||
mSummary2.setText("");
|
||||
|
||||
mBatteryMeterView.setBatteryLevel(info.batteryLevel);
|
||||
mBatteryMeterView.setCharging(!info.discharging);
|
||||
|
Reference in New Issue
Block a user