bendemboski / dateslider Goto Github PK
View Code? Open in Web Editor NEWAn alternative DatePicker for Android
Home Page: http://code.google.com/p/android-dateslider/
License: Other
An alternative DatePicker for Android
Home Page: http://code.google.com/p/android-dateslider/
License: Other
Any plans to support even the seconds as Labeler? Would be useful when you want to set an alarm with precision.
How do you enable backwards scrolling through time? From the code available, I can only scroll forwards.
The README hasn't been updated for the changes in 93310df, and some of it is out-of-date.
Some users try to select dates clicking in the date (instead scroll to it).
Is there any way to select (scroll to) the child view clicked by the user?
Thanks in advance
Is there a way to do this in the existing codebase?
We should figure out a way to make the MINUTEINTERVAL configurable for code, or better yet, from XML. However, since in XML labelers are only specified by their class names, this might have to be a generic property that could be set for any type of labeler.
It's ok when debug mode and export apk file without proguard. But after proguard, my app fore close when touch DateSlider. (I'm copy source code to my package)
use Default Date slider.
slide month backward.
soon you will notice, that months are repeating (I've got a lot of Mar'2011, but I managed to get to oct'2010 - days began to repeat there too)
os version: CM7
I am using the SliderContainer within a Fragment whic itself is transitively contained in a ViewPager/TabHost. The ViewPager intercepts touch events and causes the tabs to change instead of making the sliders scroll.
Iin DateSlider.java, line 138, the run()
method is incorrectly annotated with @Override
, which produces an error in Eclipse.
Looking to increase the size of the TimeLayoutView to give more space between the days. I tried adding the following lines of code, but they aren't working:
//This did nothing
topView.setMinWidth(200);
//This made the text disappear
topView.setLayoutParams(new LayoutParams(200,LayoutParams.WRAP_CONTENT,1.0f));
This only makes sense if we implement #3. It we do implement #3 and have configurable intervals, then it would also be very useful to have a configuration parameter that instructs the scrollview to "snap to" the interval. In other words, rather than the observer (e.g. the hosting Dialog) knowing what the interval is and rounding down to the nearest interval as some do now, this would be encapsulated at a lower level.
This would probably involve the SliderContainer hiding this information -- all of the ScrollLayouts behave exactly as they do now, but the SliderContainer only notifies its observer when the time crosses an interval boundary, and then it sends the time of that boundary.
We might be able to get fancier and restrict the movement of the scrollers so they stick to their value until scrolled far enough, and then do a quick "bounce" to the next value.
For API 22, showDialog() is deprecated
When implementing an OnDateSetListener
for a DateSlider, the Calendar
object that is passed to the listener's onDateSet
method is not adjusted to the configured MINUTEINTERVAL
. Instead, the normal date is returned, so you end up getting dates in between the interval, such as 5:10 when the MINUTEINTERVAL
is set to 15.
Expected behavior is the Calendar
returned matches the date chosen by the user, without having to do a
selectedDate.set(Calendar.MINUTE, selectedDate.get(Calendar.MINUTE)/TimeLabeler.MINUTEINTERVAL*TimeLabeler.MINUTEINTERVAL);
to correct it.
The application should be able to optionally specify a start and/or end time that defines a (possibly half-open) range of allowable times. If the user tries to scroll back past the range start or forward past the range end, the scroller should just not scroll. This would be very useful for cases where the application needs the user to choose a time in the future, or in the past, and probably for other cases as well.
Why not you add screenshot for it in the description to make easier for others to detect if this is what they need?
After instantiation, it's no longer possible to set the min/max times (for example, when using 2 DateSliders as a range picker). The DateSlider
class provides a setTime()
method, it should also provide setMinTime()
and setMaxTime()
to allow changing those values on the fly. I've added those methods to my own code and they seem to work fine:
public void setMinTime(Calendar c) {
minTime = c;
if(c != null){
mContainer.setMinTime(c);
}
}
public void setMaxTime(Calendar c) {
maxTime = c;
if(c != null){
mContainer.setMaxTime(c);
}
}
In our project (a reservation system) we are using the DateTimeSlider component, while generally there is a positive feedback (much much better than the default way) several users are complaining that the auto scrolling of the bars is not very intuitive and confusing. E.g. If I only want to change the day of my reservation but not the time it is hard to achieve and can lead to errors. So in our use case it would be more suitable to make them act separately / independently (like in iOS).
It would be great if there could be an option to configure this behavior as the user desires.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.