I have a Spinner and as data these hours:
final String[] horasInicio = new String[] {
"09:00",
"09:30",
"10:00",
"10:30",
"11:00",
"11:30",
"12:00",
"12:30",
"13:00",
"13:30",
"14:00",
"14:30",
"15:00",
"15:30",
"16:00",
"16:30",
"17:00",
"17:30",
"18:00",
"18:30",
"19:00",
"19:30",
"20:00",
"20:30"
};
How can I do so that if they are, for example, 11:49, another array or ArrayList is generated that has the spinner data that would be 12:00, 12:30, 13:00, 13:30. .. until 20:30. If it is 13:12, then generate a list with the data 13:30, 14:00, 14:30 ... until 20:30. are the hours of beginning of reservations, so if it is 11:49, the logical thing is that the first hour of reservation is 12:00 and as you can reserve half an hour in half an hour, go 12:00, 12 : 30 ... 20:30.