• Stars
    star
    199
  • Rank 196,105 (Top 4 %)
  • Language
    Java
  • Created about 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

绘画板,支持平滑跟随,常用形状,图层变换

AndroidDrawingView

绘画板,支持平滑跟随,常用形状,图层变换

Import

JitPack

Add it in your project's build.gradle at the end of repositories:

repositories {
  // ...
  maven { url "https://jitpack.io" }
}

Step 2. Add the dependency in the form

dependencies {
  compile 'com.github.vilyever:AndroidDrawingView:1.6.7'
}

Usage

<com.vilyever.drawingview.DrawingView
    android:id="@+id/drawingView"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:layout_weight="1"/>

drawingView = (DrawingView) rootView.findViewById(R.id.drawingView);
drawingView.setUndoRedoStateDelegate(new DrawingView.UndoRedoStateDelegate() {
    @Override
    public void onUndoRedoStateChange(DrawingView drawingView, boolean canUndo, boolean canRedo) {
        undoButton.setEnabled(canUndo);
        redoButton.setEnabled(canRedo);
    }
});

drawingView.setInterceptTouchDelegate(new DrawingView.InterceptTouchDelegate() {
    @Override
    public void requireInterceptTouchEvent(DrawingView drawingView, boolean isIntercept) {

    }
});

drawingView.setBackgroundDatasource(new DrawingView.BackgroundDatasource() {
    @Override
    public Drawable gainBackground(DrawingView drawingView, String identifier) {
        return null;
    }
});

penBrush = PenBrush.defaultBrush();
drawingView.setBrush(penBrush);

License

Apache License Version 2.0

More Repositories

1

AndroidSocketClient

Socket封装
Java
1,293
star
2

HowToCustomLayoutManager

How To Custom LayoutManager
Java
63
star
3

AndroidContextHolder

任意位置下获取应用context
Java
32
star
4

AndroidAbsListViewLoadMore

ListView/GridView添加加载更多
Java
9
star
5

AndroidJsonModel

Json model 转换
Java
8
star
6

UISlider-TrackHeight

调整UISlider的滑动条高度
Objective-C
7
star
7

UISearchBar-InnerComponents

获取UISearchBar内部输入控件textField和按钮控件Cancel Button.
Objective-C
6
star
8

UIButton-XibLinesText

自动转换UIButton在Xib设置Title时输入的换行符\n或\r\n
Objective-C
5
star
9

UIScrollView-Position

判断UIScrollView是否在顶部/底部,添加UIScrollView滑动到底部方法。
Objective-C
5
star
10

AndroidPopupController

popupWindow便捷封装
Java
4
star
11

NSDictionary-Enhance

NSDictionary NSMutableDictionary 增强
Objective-C
4
star
12

AndroidFileReadWrite

文件读写操作
Java
4
star
13

MediaPlayer-VolumeControl

调节音量。
Objective-C
3
star
14

AndroidReflectKit

反射操作封装
Java
3
star
15

AndroidLogger

应用中查看log
Java
3
star
16

IOS-QuickDevelopMacros

iOS宏指令集合
Objective-C
3
star
17

TestDragExtend

Java
3
star
18

IOS-QuickDevelopTools

涵括先前发布的部分快速开发工具,通过依赖使用Cocoapods快速导入。
Objective-C
3
star
19

VDProperty

提取property的声明的属性
Objective-C
2
star
20

AndroidActivityHelper

Activity管理帮助工具
Java
2
star
21

objcView

Objective-C
2
star
22

AndroidUnitConversion

Android转换单位dp,sp,px
Java
2
star
23

Libstreaming

Java
2
star
24

AndroidFindView

FindViewById无需转换类型
Java
1
star
25

AndroidResource

Resource便捷封装
Java
1
star
26

ubuntu

FileForUnbutu14.04
Shell
1
star
27

objcProperty

Objective-C
1
star