Android Recycler View |Android App Development With AndroidCource

Friday 15 September 2017

Android Recycler View

Recycler View


Android RecyclerView is more advanced version of ListView with improved performance and other benefits.

Recycler view using Card view.

Recycler view allow different layout manager.

Recycler view Linear Layout,Grid Layout Staggered Grid Layout are easy to Creates.

Recycler view use to ViewHolder store reference of the view.

A ViewHolder class is inner static class in your adapter which holds reference to the views.

The view holder objects are managed by an adapter, which you create by extending the RecyclerView.Adapter abstract class.

Adapter to bind view holders data.It is assigning the view holder position and call adapter onBindViewHolder() method.

Recycler view Adding Animation for adding and removing items.

Use this Dependency in gradle file.


dependencies compile "com.android.support:recyclerview-v7:25.3.1"

Card View

Card View extends FrameLayout. And show item is cards.

Card Vew use attribute is card_view:cardElevation dynamic shadow.

card_view:cardCornerRadius attribute use to set corner radius in the layout.

CardView.setRadius attribute use to set in the code.

card_view:cardBackgroundColor attribute use to set card background.

Use this Dependency in gradle file.


dependencies compile "com.android.support:cardview-v7:25.3.1" 

0 comments:

Post a Comment