In the activity_main.xml, we will place a RecyclerView widget as this is our main Layout.Īdd the (following) dependency for the RecyclerView in the adle(Module:app)Ĭompile ':recyclerview-v7:26.0.0-alpha1' When we start a new project, the MainActivity java class and activity_main.xml will be created by default. Here is a live demo of the expected output(demo-1). This is a simple RecyclerView using ArrayList. Then we will see how to enhance the RecyclerView using CardView. Here, in our sample, we are going to see, how we could use it using ArrayList.įirst let us see how we could populate a Simple RecyclerView using ArrayList. We can use RecyclerView with any kind of data, say Array, ArrayList, JSON, XML etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |