我有一台ShapeDrawable
final ShapeDrawable drawable = new ShapeDrawable(shape);
drawable.getPaint().setStyle(Paint.Style.FILL);
drawable.getPaint().setColor(0xFFffffff);我想为这个可绘制的设置边框(笔触)颜色和宽度。
我尝试使用setStyle(Paint.Style.FILL_AND_STROKE),但它设置的背景和边框颜色相同
发布于 2015-08-07 11:30:04
使用
drawable.getPaint().setStyle(Paint.Style.STROKE);
drawable.getPaint().setStrokeWidth(2); // in pixelhttps://stackoverflow.com/questions/31103974
复制相似问题