You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the setvalue method gives me a divide by zero exception.
My code is as follows:
mWheel = (Wheel) v.findViewById(R.id.wheel);
mWheel.setOnScrollListener( new Wheel.OnScrollListener() {
@Override
public void onScrollStarted( Wheel view, float value, int roundValue ) {
Log.i("SPINZ", "STARTED: f: " + value + " / i: " + roundValue);
}
@Override
public void onScrollFinished( Wheel view, float value, int roundValue ) {
Log.i("SPINZ", "FINISHED: f: " + value + " / i: " + roundValue);
roundValue *= -1;
roundValue += 40;
if (roundValue >= 0 && roundValue < sections.length)
mSectionTV.setText(sections[roundValue]);
}
@Override
public void onScroll( Wheel view, float value, int roundValue ) {
roundValue *= -1;
roundValue += 40;
if (roundValue >= 0 && roundValue < sections.length)
mSectionTV.setText(sections[roundValue]);
}
} );
mWheel.setValue(1.0f, true);
If I take mWheel.setValue(1.0f, true) and move it to right after mWheel = (Wheel) v.findViewById(R.id.wheel), then I don't get the divide by zero exception, but the method doesn't do anything either.
The text was updated successfully, but these errors were encountered:
Using the
setvalue
method gives me adivide by zero
exception.My code is as follows:
If I take
mWheel.setValue(1.0f, true)
and move it to right aftermWheel = (Wheel) v.findViewById(R.id.wheel)
, then I don't get the divide by zero exception, but the method doesn't do anything either.The text was updated successfully, but these errors were encountered: