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
I've used this code to implement this in my project.
WheelView wheelView = new WheelView(this);
wheelView.setWheelItemRadius(30);
wheelView.setWheelItemCount(10);
wheelView.setWheelRadius(120);
wheelView.setRepeatableAdapter(true);
wheelView.setWheelOffsetY(60);
wheelView.setSelectionAngle(90);
wheelView.setWheelColor(Color.parseColor("#ff0000"));
wheelView.setWheelItemTransformer(new SimpleItemTransformer());
wheelView.setWheelSelectionTransformer(new FadingSelectionTransformer());
wheelView.setLayoutParams(new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
wheelView.setWheelDrawableRotatable(false);
wheelView.setAdapter(new WheelAdapter() {
@Override
public Drawable getDrawable(int position) {
//return drawable here - the position can be seen in the gifs above
return new TextDrawable("A" + position);
}
@Override
public int getCount() {
//return the count
return 10;
}
});
rl.addView(wheelView);`
and this is the output I've got
The text was updated successfully, but these errors were encountered:
this error does not correctly execute the following code.
wheelview.class
if (mWheelToItemDistance == ViewGroup.LayoutParams.MATCH_PARENT) {
mWheelToItemDistance = (int) (mWheelBounds.mRadius - mItemRadius - mWheelPadding);
}
I've used this code to implement this in my project.
and this is the output I've got
The text was updated successfully, but these errors were encountered: