【开源】DrawableView
DrawableView
- https://github.com/PaNaVTEC/DrawableView
介绍:
可以用手指在画布上涂鸦的库运行效果:
![]()
使用说明:
在build.gradle中添加依赖:
|
1
2
3
|
dependencies { compile 'me.panavtec:drawableview:{Lib version, see the mvn central badge}'} |
将view添加到xml中:
|
1
2
3
4
|
<me.panavtec.drawableview.DrawableView android:id="@+id/paintView" android:layout_width="match_parent" android:layout_height="match_parent"/> |
在activity中配置:
|
1
2
3
4
5
6
7
8
|
DrawableViewConfig config = new DrawableViewConfig();config.setStrokeColor(getResources().getColor(android.R.color.black));config.setStrokeWidth(20.0f);config.setMinZoom(1.0f);config.setMaxZoom(3.0f);config.setCanvasHeight(1080);config.setCanvasWidth(1920);drawableView.setConfig(config); |
posted on 2015-04-21 10:09 wasdchenhao 阅读(149) 评论(0) 收藏 举报

浙公网安备 33010602011771号