ViewOverlay in Android

Fourfold animation
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:ordering="together">
<objectAnimator
android:propertyName="rotationX"
android:valueFrom="0"
android:valueTo="180"
android:valueType="floatType" />
<objectAnimator
android:propertyName="alpha"
android:valueFrom="@dimen/fourfold_from_alpha"
android:valueTo="@dimen/fourfold_to_alpha"
android:valueType="floatType" />
</set>
 val animatorSet = AnimatorInflater.loadAnimator(context,
R.animator.bottom_close_up) as AnimatorSet
animatorSet!!.setTarget(thirdSquare)
animatorSet!!.duration = animationDuration.toLong()
animatorSet!!.interpolator = interpolator
animatorSet!!.start()
Animating third and fourth squares
No !!!
this.overlay.add(thirdSquare)
this.overlay.add(forthSquare)
animation with overlay
Exactly !
  • The bounds of the drawable should be relative to the host view.
  • Any drawable added to the overlay should be removed when it is no longer needed or no longer visible.
  • Adding an already existing Drawable is a no-op.
  • Passing null parameter will result in an IllegalArgumentException being thrown.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store