Avoid fade animation when users switch index in hour chart.

Before: https://drive.google.com/file/d/13L1hfbhLiNY_GlT0zzE-SqU3fNXmdta6/view?usp=sharing
After: https://drive.google.com/file/d/1l75m1gzGBcy41SFHJvkcDiwaeZo0Rzpj/view?usp=sharing

Test: manually
Bug: 245655904
Change-Id: Iffaf5328b04ffb1f0ff155ecd8c67cd58b9cbfb5
This commit is contained in:
Kuan Wang
2022-09-20 12:15:26 +08:00
parent bd9042c47f
commit b1b79bf0f0

View File

@@ -695,7 +695,6 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
} }
if (visible) { if (visible) {
mHourlyChartView.setAlpha(0f);
mHourlyChartView.setVisibility(View.VISIBLE); mHourlyChartView.setVisibility(View.VISIBLE);
mHourlyChartView.animate() mHourlyChartView.animate()
.alpha(1f) .alpha(1f)