Open dvkch opened 5 years ago
Seeing this as well. When changing the max Value, wheel appear as wrapped until scrolled.
I had the same issue. This can be fixed though, if you place optionsPicker.wrapSelectorWheel = false
AFTER optionsPicker.maxValue = options.size - 1
and BEFORE optionsPicker.value = 0
.
It has to be after setMaxValue()
as that method overwrites the mWrapSelectorWheel
flag.
That fixed it. Maybe what's done in setValue()
that causes the view to refresh could also be done in setWrapSelectorWheel
to circumvent this particular ordering?
This didn't fix my issue. I still get it when the values are refreshed.
@anudeepreddygopu I got the same issue, but I got something..
if you still experience the same problem after following this
I had the same issue. This can be fixed though, if you place
optionsPicker.wrapSelectorWheel = false
AFTERoptionsPicker.maxValue = options.size - 1
and BEFOREoptionsPicker.value = 0
.It has to be after
setMaxValue()
as that method overwrites themWrapSelectorWheel
flag.
make sure that you already set app:np_wheelItemCount or via java/kotlin code. that fixed my problem
First of all, thanks for this library, I spent hours looking for something like this and it is great! That being said I have an issue with
wrapSelectorWheel
.I use the NumberPicker to display a dynamic list of strings and
wrapSelectorWheel
is only applied after I the selected item has changed from user scrolling. Initially it shows a wrapped wheel, which can't be scrolled up, and after the user scrolls the wrapped items disappear. They reappear again after I change the inputs.Here is the layout part:
Here is the code changing the inputs:
I saw other issues on this and tried setting the property after I change the min/max values but the behaviour persists.