I'm new to Android development so bear with me. I'm trying to implement a day planner that has 24 Buttons that represent each hour of a day. On button click there should appear a new Activity in which you can type what you have planned for that hour and/or change the button's color.
My question is, how should I implement the click listeners so that I don't have to write a separate one for each button? How do I link each button to a description?
What I thought about doing is to create a class "Hour" that has as attributes a Button and a String (the description) and then creating an array of those but how do I then map each Button to an entry of that array dynamically without hardcoding?