Is it possible to do a timepicker this way of the image? So I can put a range, hours. If so, is there an example or a library? If not, any suggestions?
Yes, it is possible to do a customization of Seekbar
, but natively has only one slider. To create 2 controls, if you are in a hurry, you can use a lib ready. Here are some examples:
But that's not all. Then you should set the maximum value of SeekBar
to 1440
, which represents exactly the number of minutes in 24 hours. That's assuming you will not use the "seconds" factor. Then the calculation is simple:
int hours = valueMax / 60; // o resultado representa as horas
int minutes = valueMax % 60; // o resultado representa os minutos
This you will have to do for each of the sliders.