When it's come to display list of items in android the best and ease way is to use RecyclerView.
RecyclerView is android widget which uses ViewHolder patter to save the inflated views,so that when user scroll the list then views are recycle and not created again.
Recycling of views is very use full from memory and performance perspective.
So,In this tutorial,
We gone a build simple example,we create MyRecyclerViewAdapter which extends from RecyclerView.Adapter class,this class is the adapter class which hold the data and view which we display in RecyclerView.
We need layout which represent list item,which we create in word_list_item.xml file.
We Also create activity_main.xml and MainActivity.Java to display Item List.
TrendyProgrammer's Code is well commented so you can find out what is going on in code,by just Reading it.
So Let's Look the Code:
MyRecyclerViewAdapter.Java
word_list_item.xml
MainActivity.Java
activity_main.xml
Please Leave your Comments and Let Us Know Your Thoughts About This Tutorial.
RecyclerView is android widget which uses ViewHolder patter to save the inflated views,so that when user scroll the list then views are recycle and not created again.
Recycling of views is very use full from memory and performance perspective.
So,In this tutorial,
We gone a build simple example,we create MyRecyclerViewAdapter which extends from RecyclerView.Adapter class,this class is the adapter class which hold the data and view which we display in RecyclerView.
We need layout which represent list item,which we create in word_list_item.xml file.
We Also create activity_main.xml and MainActivity.Java to display Item List.
TrendyProgrammer's Code is well commented so you can find out what is going on in code,by just Reading it.
So Let's Look the Code:
MyRecyclerViewAdapter.Java
word_list_item.xml
MainActivity.Java
activity_main.xml
Please Leave your Comments and Let Us Know Your Thoughts About This Tutorial.
No comments:
Post a Comment