I'd like to programmatically create ImageViews inside a RecyclerView list of CardViews in my app. At the moment, each CardView had a +
button which upon onClick adds the item in the CardView to a database.
I'd like to replace the +
button with a checkmark image, to indicate to the user that the item in question has been added to the database. I'd also like to include two other ImageViews on an added CardView item: a delete button and and edit button, to allow the user to delete or edit the item respectively.
Is this something I'll need to do in my custom adapter? Should I be creating a separate XML layout file with the edit/delete buttons and inflate that layout within a new, programatically-created ImageView?
I've already replaced the +
image with a checkmark, using the setImageResource() method within my item's setOnClickListener() method, but I know this isn't the correct solution: this just replaces the image within the existing ImageView.