[Expressive Battery] Tweak the animation of Battery Usage screen.

Fix the blinking while tapping chart to select time intervals.
- setHasStableIds(true) to avoid BatteryChartView create viewHolder again when SettingsPreferenceGroupAdapter invoke notifyDataSetChanged()

Recover the fade-in animation when display the hourly chart for the first time.
- set the default alpha of hourly chart in xml to 0.

Bug: 378997970
Bug: 349652542
Flag: EXEMPT bug fix
Test: visual
Change-Id: Ia6c131452fca65db7149664c7e18ca68e9703def
This commit is contained in:
mxyyiyi
2024-12-18 21:38:27 +08:00
parent d7a54332f0
commit c369a8df5a
2 changed files with 10 additions and 0 deletions

View File

@@ -53,6 +53,7 @@
android:layout_height="@dimen/chartview_layout_height"
android:layout_marginBottom="16dp"
android:visibility="gone"
android:alpha="0"
android:contentDescription="@string/hourly_battery_usage_chart"
android:textAppearance="?android:attr/textAppearanceSmall"
settings:textColor="?android:attr/textColorSecondary" />