amoikevin / android-dateslider

Automatically exported from code.google.com/p/android-dateslider
0 stars 0 forks source link

Minute intervals do not work in DateTimeSlider #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Extend the DateTimeSlider constructor to also take a minute interval as 
argument and pass it to the superclass DateSlider
2. In you client code when you create the DateTimeSlider pass a minute 
interval, e.g. I used '30' (I assumed this would mean '30 minutes')

What is the expected output? What do you see instead?
No matter what value I use it seems to be ignored,the interval is always 15 
minutes

What version of the product are you using? On what operating system?
v.1.2

Please provide any additional information below.
When I look at the TimeSlider in the Demo it seems to work. I think it has to 
do with the different 'Labelers' that are used in the DateTimeSlider (which 
uses a TimeLabeler) and the TimeSlider which uses a HourLabeler and 
MinuteLabeler. 

In the TimeLabeler the javadoc says "A Labeler that displays times in 
increments of {@value #MINUTEINTERVAL} minutes." (MINUTEINTERVAL = 15). Still, 
when I pass in a value of 2 for the minute interval in the DateTimeSlider it 
doesn't have any effect (I would assume an interval of 2 * 15 = 30 minutes). 

Also in the DateSlider.OnDateSetListener one has to do some rounding manually 
to get the proper time.

Is there any chance that this could be fixed? 

Original issue reported on code.google.com by googelyb...@gmail.com on 27 Nov 2011 at 2:23

GoogleCodeExporter commented 9 years ago
I experienced the same problem, cannot use the dateslider due to this bug at 
the moment. It would be great if this could get fixed, the default date picker 
on android sucks big time. Thanks a lot! 

Original comment by dennis.r...@gmail.com on 29 Nov 2011 at 5:58

GoogleCodeExporter commented 9 years ago
yes this is true, The DateTimeSlider used the MinuteInterval before it was 
generically implemented. At the moment it should be sufficient to change the 
MINUTEINTERVAL value in the TimeLabeler class.
I'll change it as soon as possible. Probably this weekend.

Original comment by daniel.b...@gmail.com on 29 Nov 2011 at 6:58

GoogleCodeExporter commented 9 years ago
Hi Daniel, what's the state of this? Did you get a chance to fix this already? 
thx, Mike

Original comment by googelyb...@gmail.com on 20 Dec 2011 at 3:38

GoogleCodeExporter commented 9 years ago
I was trying to change the datetimeslider to have increments of hours but I see 
no way to do this, can someone guide me on how to do this?  A little lost on 
how its done, should be a property to setTimeInterval() for it, seems logical 
that should be in there.

Original comment by grnd...@gmail.com on 14 May 2012 at 3:06

GoogleCodeExporter commented 9 years ago
Hi Daniel,
I appreciate the date time slider and so thanks for sharing.  I was wondering 
if you had published a fix for this issue yet?  The latest download is dated 
June 2011.  Thanks,
Phil

Original comment by phil.oxe...@gmail.com on 16 Feb 2013 at 3:08