![]() ![]() To obtain a handle to it in your Activity, use the following snippet: RecyclerView rv = (RecyclerView)findViewById(R.id.rv) You can define it in a layout as follows: However, defining it in a layout XML file is quite simple. Using a RecyclerView instance is slightly more complicated. If this XML is used as the layout of an Activity, with the TextView and ImageView fields are set to meaningful values, then this is how it would render on an Android device: 3. Creating a RecyclerView Step 1: Defining It in a Layout
0 Comments
Leave a Reply. |