https://github.com/LukeDeighton/WheelView
如何将滚轮视图中的圆形项目更改为矩形请帮助
答案 0 :(得分:1)
尝试将OvalShape()更改为RectShape(),如 -
private Drawable createOvalDrawable(int color) {
ShapeDrawable shapeDrawable = new ShapeDrawable(new OvalShape());
shapeDrawable.getPaint().setColor(color);
return shapeDrawable;
}
到
private Drawable createOvalDrawable(int color) {
ShapeDrawable shapeDrawable = new ShapeDrawable(new RectShape());
shapeDrawable.getPaint().setColor(color);
return shapeDrawable;
}
MainActivity.java中的