1- < h1 > Modified by Swifty</ h1 >
2- refactor the repository, easy to use with gradle import.
1+ # Modified by Swifty
2+ ## refactor the repository, easy to use with gradle import.
33[ ![ ] ( https://jitpack.io/v/SwiftyWang/android-drag-square.svg )] ( https://jitpack.io/#SwiftyWang/android-drag-square )
44
5- < h3 > How to use</ h3 >
5+ ## How to use
66Add it in your root build.gradle at the end of repositories:
77
88``` gradle
@@ -14,36 +14,35 @@ Add it in your root build.gradle at the end of repositories:
1414 }
1515```
1616
17- Step 2. Add the dependency
17+ Add the dependency
1818``` gradle
1919 dependencies {
2020 compile 'com.github.SwiftyWang.android-drag-square:dragsquareimage:1.2.3'
2121 }
2222```
2323
24- < h3 > get DraggablePresenter</ h3 >
24+ get DraggablePresenter
2525``` java
2626 DraggableSquareView dragSquare = (DraggableSquareView ) findViewById(R . id. drag_square);
2727 contentText = (TextView ) findViewById(R . id. contentText);
2828 draggablePresent = new DraggablePresentImpl (fragment, dragSquare);
2929 draggablePresent = new DraggablePresentImpl (activity, dragSquare);
3030```
3131
32- need pass activity callback to DraggablePresentImpl:
32+ need pass activity callback to DraggablePresentImpl
3333``` java
3434 @Override
3535 protected void onActivityResult(int requestCode, int resultCode, Intent result) {
3636 draggablePresent. onActivityResult(requestCode, resultCode, result);
3737 }
3838```
3939
40- <h3 >Set customer dialog</h3 >
41- Customer dialog must extends ActionDialog.class
40+ Set customer dialog, Customer dialog must extends ActionDialog.class
4241``` java
4342 draggablePresent. setCustomActionDialog(new MyActionDialog (Context ));
4443```
4544
46- < h3 > listen image changes</ h3 >
45+ listen image changes
4746``` java
4847 dragSquare. setImageChangesListener(imageChangesListener);
4948
@@ -55,8 +54,7 @@ Customer dialog must extends ActionDialog.class
5554 void onImageDeleted (String uri , int index );
5655 }
5756```
58-
59- <h3 >All public apis</h3 >
57+ All public apis
6058``` java
6159 SparseArray<String > getImageUrls();
6260
0 commit comments