Posts

Showing posts from October, 2018
Image
Android Recycler view Animations in android studio with example Learn how to populate an empty RecyclerView list using custom animations.         What we are building! Introduction In this tutorial we’ll learn an easy way to add an initial content animation for a RecyclerView. There are some ways of doing this, e.g.: Implementing a custom ItemAnimator Add animation handling to  onBindViewHolder()  in the Adapter We’ll be using a third option,  LayoutAnimation .   It’s easy and only requires a small amount of code. It’s worth noting that though this tutorial is focused around RecyclerViews, LayoutAnimations can be applied to any subclass of ViewGroup. Let’s get started So let’s start of by creating the item animation, in this example we’ll go for the Fall Down animation shown below.             The Fall Down animation Start of by creating the file  item_animation_fall_do...
Image
RecyclerView Tutorial With Example In Android Studio In Android,  RecyclerView  is an advanced and flexible version of ListView and GridView. It is a container used for displaying large amount of data sets that can be scrolled very efficiently by maintaining a limited number of views.  RecyclerView  was introduced in Material Design in API level 21 (Android 5.0 i.e Lollipop). This new widget is a big step for displaying data in Material Design because the ListView and GridView are one of the most commonly used UI widget. In  RecyclerView  android provides a lots of new features which are not present in existing ListView or GridView. Important Note: In Android,  RecyclerView  provides an ability to implement the horizontal, vertical and Expandable List. It is mainly used when we have data collections whose elements can change at run time based on user action or any network events. For using this widget we have to sp...