I have frame layout in my app. In frame I have ImageView and TextView. I need to frame layout bounce all the time.
I've made this animation in xml:
<scale
android:duration="100"
android:fromXScale="0.1"
android:fromYScale="0.1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1.0"
android:toYScale="1.0" />
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1200"
android:fillAfter="false"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:startOffset="100"
android:repeatCount="infinite"
android:repeatMode="reverse"
android:toXScale="0.9"
android:toYScale="0.9" />
The problem is flickering of the text in text view. ImageView is fine. How to prevent this issue?
I found the solution for this:
in Manifest.xml added hardwareAccelerated.
来源:https://stackoverflow.com/questions/12748437/android-scale-animation-flickering