Adding RecyclerView, RecyclerAdapter, and ArrayList to the Note to Self project
Open the Note to self project. As a reminder, if you want to see the completed code and working app based on completing this chapter, it can be found in the Chapter16/Note to self folder.
Tip
As the required action in this chapter jumps around between different files, classes, and functions, I encourage you to follow along with the files from the download bundle open in your preferred text editor for reference.
Removing the temporary "Show Note" button and adding RecyclerView
These next few steps will get rid of the temporary code we added in Chapter 14, Android Dialog Windows, and set up our RecyclerView ready for binding to RecyclerAdapter later in the chapter:
- In the
content_main.xmlfile, remove the temporaryButtonwith anidofbutton, which we added previously for testing purposes. - In the
onCreatefunction ofMainActivity.kt, delete theButtoninstance declaration and initialization along with the...