October 2018
Intermediate to advanced
464 pages
15h 17m
English
If you ran the code, then you saw it’s a very simple app. In fact, it doesn’t do anything more than just display the list in a scrollable container. Most apps will require some interaction with the list so how do we respond to click events? Unlike the older ListView, RecyclerView does not have any click events built-in. It's up to you, the programmer, to create the events you need. (For basic items like in our example, this may seem like more work for the programmer, but when you get to complex list items with buttons and other interactive controls, ListView would often get in your way and you’d need to implement custom events anyway.)
To respond to item clicks, add the following code to the MyAdapter class:
private void remove ...