Stop Circular Scrolling Of Date Picker
I am writing an application where using Date Picker. Here I set min/max range to scroll, but is there a way to stop circular scrolling since it repeat lower bound once upper bound
Solution 1:
There is no trivial solution. You can try use DatePicker.OnDateChangedListener with some static variables and implement logic to check if your date changed through min/max date, and it did, set the last valid date with recycling. It is some strange solution, but I don't know any another. You can play with similar solution or write your custom DatePicker, or extend DatePicker from android api and override some methods that allow recycling, for this you should take a look on DatePicker source code.
Solution 2:
You can use this method in NumberPicker
dayPicker.setWrapSelectorWheel(false);
Post a Comment for "Stop Circular Scrolling Of Date Picker"