Skip to content

Instantly share code, notes, and snippets.

@patrick-elmquist
Last active August 3, 2018 07:14
Show Gist options
  • Save patrick-elmquist/931b47b7305da30c894568b0f9efb252 to your computer and use it in GitHub Desktop.
Save patrick-elmquist/931b47b7305da30c894568b0f9efb252 to your computer and use it in GitHub Desktop.
Enter animation demo: Apply GridLayoutAnimation
int resId = R.anim.grid_layout_animation_from_bottom;
LayoutAnimationController animation = AnimationUtils.loadLayoutAnimation(ctx, resId);
recyclerview.setLayoutAnimation(animation);
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layoutAnimation="@anim/grid_layout_animation_from_bottom"
/>
@Saingkdompy
Copy link

what about ctx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment