AndroidWheel icon indicating copy to clipboard operation
AndroidWheel copied to clipboard

setValue can not work

Open aisk opened this issue 13 years ago • 4 comments

mWheel.setValue(1, false) seems not work in onCreate , but in OnScrollListener it works fine.

aisk avatar Dec 19 '12 09:12 aisk

same here I can call setValue without a problem from outside of onCreate;

eziosoft avatar Feb 24 '13 15:02 eziosoft

It's because GetRealWidth return 0 (because it has never been calculated before). I made a workaround by storing in SharedPref width of the wheel and passing it to setValue as a parameter, then in setValue : int w = Math.max(previousWidth, getRealWidth()); (previousWidth = setValue parameter). It's very hacky, I don't like it. But it works.

JeanMichelF avatar Apr 13 '15 23:04 JeanMichelF

you can implements OnLayoutListener, then ref:https://github.com/sephiroth74/AndroidWheel/issues/3

gnemoug avatar Sep 08 '15 08:09 gnemoug

@gnemoug Almost forgot this issue and the bug, I think this repo is dead.

aisk avatar Sep 08 '15 08:09 aisk