0
Yes, it is possible to make a customization of the Seekbar
, but natively has only one slider. To create 2 controls, if you are in a hurry, can use a lib ready. Here are some examples:
But it’s not just that. Then you must set the maximum value of SeekBar
in 1440
, which represents exactly the amount of minutes in 24 hours. This considering that 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.
@ramaral you know
timepicker
in the format ofseekbar
? That would be my suggestion, that it might even give a little work, but it will work.– viana
I researching also just found this style that you made, I’m testing here and I return you. I am using this https://android-arsenal.com/details/1/3996
– Henrique
@Henriquemendes I have something almost ready here, but I can’t help you now. Try there, anything if you can’t, give me a call. But the logic is this. If it were the case to use in an application of mine, I would do so.
– viana
I used the library I passed above, and its logic worked, to bring the minutes and hours, thank you very much!
– Henrique
@Acklay, no, I don’t know but your solution is feasible. Remember that the
@nome
doesn’t always work, I found your comment by chance.– ramaral