Slide 27
Slide 27 text
Custom attributes – animations
@BindingAdapter({"app:animatedVisibility"})
public static void setVisibility(View view,
int visibility) {
…
ObjectAnimator alpha =
ObjectAnimator.ofFloat(view,
View.ALPHA, startAlpha, endAlpha);
…
alpha.start();
}
Full example: https://medium.com/google-developers/android-data-binding-animations-55f6b5956a64