├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── drawable │ │ │ ├── ic_launcher.png │ │ │ ├── common_btn_ok.png │ │ │ ├── common_btn_close.png │ │ │ ├── sticker_edit_del.png │ │ │ ├── edit_cut_crop_16_9_a.png │ │ │ ├── edit_cut_crop_16_9_b.png │ │ │ ├── edit_cut_crop_1_1_a.png │ │ │ ├── edit_cut_crop_1_1_b.png │ │ │ ├── edit_cut_crop_2_3_a.png │ │ │ ├── edit_cut_crop_2_3_b.png │ │ │ ├── edit_cut_crop_3_2_a.png │ │ │ ├── edit_cut_crop_3_2_b.png │ │ │ ├── edit_cut_crop_3_4_a.png │ │ │ ├── edit_cut_crop_3_4_b.png │ │ │ ├── edit_cut_crop_4_3_a.png │ │ │ ├── edit_cut_crop_4_3_b.png │ │ │ ├── edit_cut_crop_9_16_a.png │ │ │ ├── edit_cut_crop_9_16_b.png │ │ │ ├── img_edit_tab_clip_a.png │ │ │ ├── img_edit_tab_clip_b.png │ │ │ ├── img_edit_tab_rotate_a.png │ │ │ ├── img_edit_tab_rotate_b.png │ │ │ ├── sticker_edit_control.png │ │ │ ├── sticker_edit_set_top.png │ │ │ ├── sticker_edit_symmetry.png │ │ │ ├── edit_cut_crop_freedom_a.png │ │ │ ├── edit_cut_crop_freedom_b.png │ │ │ ├── sticker_edit_drop_down.png │ │ │ ├── edit_rotate_flipx_pressed.png │ │ │ ├── edit_rotate_flipx_released.png │ │ │ ├── edit_rotate_flipy_pressed.png │ │ │ ├── edit_rotate_flipy_released.png │ │ │ ├── edit_rotate_left_pressed.png │ │ │ ├── edit_rotate_left_released.png │ │ │ ├── edit_rotate_right_pressed.png │ │ │ ├── edit_rotate_right_released.png │ │ │ ├── sticker_edit_color_black.png │ │ │ ├── sticker_edit_color_white.png │ │ │ └── icon_repeat_bitmap.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ └── layout │ │ │ ├── xfermode_activity.xml │ │ │ ├── sticker_source_activity.xml │ │ │ ├── eidt_rotate_mode_item.xml │ │ │ ├── sticker_item.xml │ │ │ ├── xfermode_item.xml │ │ │ ├── edit_crop_mode_item.xml │ │ │ ├── home_activity.xml │ │ │ ├── test_compress_activity.xml │ │ │ ├── sticker_image_activity.xml │ │ │ ├── graffiti_activity.xml │ │ │ └── edit_activity.xml │ │ ├── jniLibs │ │ ├── armeabi │ │ │ └── libcompress.so │ │ └── armeabi-v7a │ │ │ └── libcompress.so │ │ ├── java │ │ └── com │ │ │ └── march │ │ │ ├── picedit │ │ │ ├── MyApplication.java │ │ │ ├── sticker │ │ │ │ ├── model │ │ │ │ │ └── StickerSource.java │ │ │ │ ├── ResourceFactory.java │ │ │ │ ├── StickerSourceActivity.java │ │ │ │ └── StickerImageActivity.java │ │ │ ├── PicEditActivity.java │ │ │ ├── SelectImageActivity.java │ │ │ ├── test │ │ │ │ ├── TestPorterDuffXfermodeActivity.java │ │ │ │ ├── PorterDuffXfermodeView.java │ │ │ │ └── TestCompressImageActivity.java │ │ │ ├── MainActivity.java │ │ │ └── graffiti │ │ │ │ └── GraffitiActivity.java │ │ │ └── turbojpeg │ │ │ └── TurboJpegUtils.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── lowpoly ├── .gitignore ├── src │ └── main │ │ ├── res │ │ └── values │ │ │ └── strings.xml │ │ ├── jniLibs │ │ ├── x86 │ │ │ └── liblowpoly.so │ │ ├── armeabi │ │ │ └── liblowpoly.so │ │ └── armeabi-v7a │ │ │ └── liblowpoly.so │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── uniquestudio │ │ └── lowpoly │ │ └── LowPoly.java ├── build.gradle └── proguard-rules.pro ├── piceditor ├── .gitignore ├── src │ └── main │ │ ├── res │ │ └── values │ │ │ └── strings.xml │ │ ├── java │ │ └── com │ │ │ └── march │ │ │ └── piceditor │ │ │ ├── common │ │ │ ├── IDrawable.java │ │ │ ├── TouchHandler.java │ │ │ └── ClickChecker.java │ │ │ ├── functions │ │ │ ├── sticker │ │ │ │ ├── model │ │ │ │ │ ├── Position.java │ │ │ │ │ ├── StickerMenu.java │ │ │ │ │ └── Sticker.java │ │ │ │ ├── listener │ │ │ │ │ ├── StickerMenuHandler.java │ │ │ │ │ └── OnStickerEventListener.java │ │ │ │ ├── gesture │ │ │ │ │ ├── StickerBaseTouchHandler.java │ │ │ │ │ └── impl │ │ │ │ │ │ ├── MoveHandler.java │ │ │ │ │ │ ├── TwoFingersHandler.java │ │ │ │ │ │ └── BottomRightCornerHandler.java │ │ │ │ └── EasyMenuHandler.java │ │ │ ├── crop │ │ │ │ └── gesture │ │ │ │ │ ├── impl │ │ │ │ │ ├── MoveHandler.java │ │ │ │ │ ├── TwoFingerHandler.java │ │ │ │ │ ├── NoAspectRatioCropHandler.java │ │ │ │ │ └── AspectRatioCropHandler.java │ │ │ │ │ └── CropBaseHandler.java │ │ │ ├── rotate │ │ │ │ └── RotateFrameLayout.java │ │ │ └── graffiti │ │ │ │ ├── model │ │ │ │ └── TouchPartHolder.java │ │ │ │ ├── GraffitiLayerConfig.java │ │ │ │ └── GraffitiOverlayView.java │ │ │ ├── utils │ │ │ ├── Utils.java │ │ │ ├── ViewUtils.java │ │ │ ├── LogUtils.java │ │ │ ├── CalculateUtils.java │ │ │ ├── BitmapUtils.java │ │ │ ├── DrawUtils.java │ │ │ ├── GraffitiUtils.java │ │ │ └── Blur.java │ │ │ └── model │ │ │ └── PointF.java │ │ └── AndroidManifest.xml ├── build.gradle └── proguard-rules.pro ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── settings.gradle ├── .idea ├── encodings.xml ├── vcs.xml ├── runConfigurations.xml ├── gradle.xml ├── modules.xml └── misc.xml ├── gradle.properties ├── README.md ├── .gitignore ├── freeline.py ├── gradlew.bat ├── gradlew └── freeline_project_description.json /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /lowpoly/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /piceditor/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PictureEditor 3 | 4 | -------------------------------------------------------------------------------- /lowpoly/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LowPoly 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /piceditor/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PicEditor 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libcompress.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/jniLibs/armeabi/libcompress.so -------------------------------------------------------------------------------- /app/src/main/res/drawable/common_btn_ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/common_btn_ok.png -------------------------------------------------------------------------------- /lowpoly/src/main/jniLibs/x86/liblowpoly.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/lowpoly/src/main/jniLibs/x86/liblowpoly.so -------------------------------------------------------------------------------- /app/src/main/res/drawable/common_btn_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/common_btn_close.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sticker_edit_del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/sticker_edit_del.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lowpoly/src/main/jniLibs/armeabi/liblowpoly.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/lowpoly/src/main/jniLibs/armeabi/liblowpoly.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libcompress.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/jniLibs/armeabi-v7a/libcompress.so -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_16_9_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_16_9_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_16_9_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_16_9_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_1_1_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_1_1_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_1_1_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_1_1_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_2_3_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_2_3_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_2_3_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_2_3_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_3_2_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_3_2_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_3_2_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_3_2_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_3_4_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_3_4_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_3_4_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_3_4_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_4_3_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_4_3_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_4_3_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_4_3_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_9_16_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_9_16_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_9_16_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_9_16_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_edit_tab_clip_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/img_edit_tab_clip_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_edit_tab_clip_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/img_edit_tab_clip_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_edit_tab_rotate_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/img_edit_tab_rotate_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/img_edit_tab_rotate_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/img_edit_tab_rotate_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sticker_edit_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/sticker_edit_control.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sticker_edit_set_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/sticker_edit_set_top.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sticker_edit_symmetry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/sticker_edit_symmetry.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /lowpoly/src/main/jniLibs/armeabi-v7a/liblowpoly.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/lowpoly/src/main/jniLibs/armeabi-v7a/liblowpoly.so -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_freedom_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_freedom_a.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_cut_crop_freedom_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_cut_crop_freedom_b.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sticker_edit_drop_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/sticker_edit_drop_down.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_flipx_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_flipx_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_flipx_released.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_flipx_released.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_flipy_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_flipy_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_flipy_released.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_flipy_released.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_left_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_left_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_left_released.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_left_released.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_right_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_right_pressed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/edit_rotate_right_released.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/edit_rotate_right_released.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sticker_edit_color_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/sticker_edit_color_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/sticker_edit_color_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chendongMarch/ImageEditor/HEAD/app/src/main/res/drawable/sticker_edit_color_white.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':piceditor' 3 | include ':lowpoly' 4 | include ':uikit' 5 | include ':lightadapter' 6 | include ':common' 7 | include ':gallery' 8 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/icon_repeat_bitmap.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /piceditor/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | def version = rootProject.ext.version 4 | 5 | android { 6 | compileSdkVersion version.compileSdkVersion 7 | } 8 | 9 | dependencies { 10 | compile project(':lowpoly') 11 | } 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed May 23 17:30:09 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /lowpoly/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/common/IDrawable.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.common; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.Paint; 5 | 6 | /** 7 | * CreateAt : 7/21/17 8 | * Describe : 9 | * 10 | * @author chendong 11 | */ 12 | public interface IDrawable { 13 | void onDraw(Canvas canvas, Paint paint); 14 | } 15 | -------------------------------------------------------------------------------- /piceditor/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/common/TouchHandler.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.common; 2 | 3 | import android.view.MotionEvent; 4 | 5 | /** 6 | * CreateAt : 7/20/17 7 | * Describe : 触摸事件处理 8 | * 9 | * @author chendong 10 | */ 11 | public interface TouchHandler { 12 | 13 | void onTouchDown(MotionEvent event); 14 | 15 | void onTouchMove(MotionEvent event); 16 | } 17 | -------------------------------------------------------------------------------- /lowpoly/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | def version = rootProject.ext.version 4 | 5 | android { 6 | compileSdkVersion version.compileSdkVersion 7 | sourceSets { 8 | //定义编译时编译文件的路径 9 | main { 10 | res.srcDirs = ['src/main/res'] 11 | jniLibs.srcDirs = ['src/main/jniLibs'] 12 | } 13 | } 14 | } 15 | 16 | dependencies { 17 | } -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #4677FF 4 | #4677FF 5 | #4677FF 6 | 7 | #4677FF 8 | #595D61 9 | #999 10 | #5000 11 | 12 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/functions/sticker/model/Position.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.functions.sticker.model; 2 | 3 | /** 4 | * CreateAt : 7/21/17 5 | * Describe : 6 | * 7 | * @author chendong 8 | */ 9 | public class Position { 10 | public static final int TOP_LEFT = 0; 11 | public static final int TOP_RIGHT = 1; 12 | public static final int BOTTOM_LEFT = 2; 13 | public static final int BOTTOM_RIGHT = 3; 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/xfermode_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/sticker_source_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/march/picedit/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.march.picedit; 2 | 3 | import com.march.common.Common; 4 | import com.march.common.utils.CrashUtils; 5 | import com.march.uikit.UIKit; 6 | import com.march.uikit.app.BaseApplication; 7 | import com.march.uikit.common.JsonParseAdapterImpl; 8 | 9 | /** 10 | * CreateAt : 7/17/17 11 | * Describe : 12 | * 13 | * @author chendong 14 | */ 15 | public class MyApplication extends BaseApplication { 16 | 17 | @Override 18 | public void onCreate() { 19 | super.onCreate(); 20 | 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/functions/sticker/listener/StickerMenuHandler.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.functions.sticker.listener; 2 | 3 | import com.march.piceditor.functions.sticker.StickerDrawOverlay; 4 | import com.march.piceditor.functions.sticker.model.Sticker; 5 | import com.march.piceditor.functions.sticker.model.StickerMenu; 6 | 7 | /** 8 | * CreateAt : 7/21/17 9 | * Describe : 菜单点击之后的动作 10 | * 11 | * @author chendong 12 | */ 13 | public interface StickerMenuHandler { 14 | void onMenuClick(StickerDrawOverlay overlay, Sticker sticker, StickerMenu menu); 15 | } 16 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/functions/sticker/listener/OnStickerEventListener.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.functions.sticker.listener; 2 | 3 | import com.march.piceditor.functions.sticker.model.Sticker; 4 | 5 | /** 6 | * CreateAt : 7/21/17 7 | * Describe : 8 | * 9 | * @author chendong 10 | */ 11 | public interface OnStickerEventListener { 12 | 13 | /** 14 | * 贴纸选择事件 15 | * 16 | * @param preSticker 上一个贴纸,可能为空 17 | * @param currentSticker 当前选中的贴纸,不为空,可能与上一个贴纸相同 18 | */ 19 | void OnStickerSelect(Sticker preSticker, Sticker currentSticker); 20 | 21 | void OnEmptyAreaClick(); 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/eidt_rotate_mode_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/march/picedit/sticker/model/StickerSource.java: -------------------------------------------------------------------------------- 1 | package com.march.picedit.sticker.model; 2 | 3 | /** 4 | * CreateAt : 7/22/17 5 | * Describe : 6 | * 7 | * @author chendong 8 | */ 9 | public class StickerSource { 10 | 11 | private String sourceUrl; 12 | private boolean withColor; 13 | 14 | public String getSourceUrl() { 15 | return sourceUrl; 16 | } 17 | 18 | public void setSourceUrl(String sourceUrl) { 19 | this.sourceUrl = sourceUrl; 20 | } 21 | 22 | public boolean isWithColor() { 23 | return withColor; 24 | } 25 | 26 | public void setWithColor(boolean withColor) { 27 | this.withColor = withColor; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lowpoly/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in E:\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/sticker_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 19 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/utils/Utils.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.utils; 2 | 3 | import android.graphics.ColorMatrixColorFilter; 4 | 5 | /** 6 | * CreateAt : 7/22/17 7 | * Describe : 8 | * 9 | * @author chendong 10 | */ 11 | public class Utils { 12 | 13 | /** 14 | * 转换 rgb 为 ColorMatrixColorFilter 15 | * 16 | * @param red r 17 | * @param green g 18 | * @param blue b 19 | * @return ColorMatrixColorFilter 20 | */ 21 | public static ColorMatrixColorFilter buildColorFilter(int red, int green, int blue) { 22 | float[] src = new float[]{ 23 | 0, 0, 0, 0, red, 24 | 0, 0, 0, 0, green, 25 | 0, 0, 0, 0, blue, 26 | 0, 0, 0, 1, 0}; 27 | return new ColorMatrixColorFilter(src); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/model/PointF.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.model; 2 | 3 | import android.view.MotionEvent; 4 | 5 | /** 6 | * CreateAt : 7/21/17 7 | * Describe : float 类型的点 8 | * 9 | * @author chendong 10 | */ 11 | public class PointF { 12 | 13 | public float x; 14 | public float y; 15 | 16 | public PointF(float x, float y) { 17 | this.x = x; 18 | this.y = y; 19 | } 20 | 21 | public PointF() { 22 | } 23 | 24 | public void set(float x, float y) { 25 | this.x = x; 26 | this.y = y; 27 | } 28 | 29 | public void set(MotionEvent event) { 30 | set(event.getX(), event.getY()); 31 | } 32 | 33 | public boolean isValid() { 34 | return x != -1 && y != -1; 35 | } 36 | 37 | public void reset() { 38 | x = -1; 39 | y = -1; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/functions/sticker/gesture/StickerBaseTouchHandler.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.functions.sticker.gesture; 2 | 3 | import com.march.piceditor.common.TouchHandler; 4 | import com.march.piceditor.functions.sticker.model.Sticker; 5 | 6 | /** 7 | * CreateAt : 7/20/17 8 | * Describe : 9 | * 贴纸手势处理基类 10 | * 11 | * @author chendong 12 | */ 13 | public abstract class StickerBaseTouchHandler implements TouchHandler { 14 | 15 | public static final int MOVE = 0; 16 | public static final int TWO_FINGER = 1; 17 | public static final int BOTTOM_RIGHT_CORNER = 2; 18 | 19 | 20 | protected Sticker mActiveSticker; 21 | 22 | public void init(Sticker activeSticker) { 23 | mActiveSticker = activeSticker; 24 | } 25 | 26 | protected boolean isHadStickerActive() { 27 | return mActiveSticker != null; 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/xfermode_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/common/ClickChecker.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.common; 2 | 3 | import android.view.MotionEvent; 4 | 5 | import com.march.piceditor.model.PointF; 6 | 7 | /** 8 | * CreateAt : 7/22/17 9 | * Describe : 10 | * 对 touch event 进行是不是点击的检测 11 | * 12 | * @author chendong 13 | */ 14 | public class ClickChecker { 15 | 16 | private long mLastDownTime; 17 | private PointF mLastDownPoint; 18 | 19 | public void onTouchDown(MotionEvent event) { 20 | mLastDownTime = System.currentTimeMillis(); 21 | mLastDownPoint = new PointF(event.getX(), event.getY()); 22 | } 23 | 24 | 25 | public boolean checkIsClickOnTouchUp(MotionEvent event) { 26 | long diffTime = System.currentTimeMillis() - mLastDownTime; 27 | float diffX = event.getX() - mLastDownPoint.x; 28 | float diffY = event.getY() - mLastDownPoint.y; 29 | return diffTime < 400 && Math.abs(diffX) < 50 && Math.abs(diffY) < 50; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 24 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/march/AndroidRes/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.blur.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /piceditor/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/march/AndroidRes/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.blur.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 图片编辑 2 | 3 | 实现图片处理的主流功能,涉及图片处理、手势事件处理、自定义控件等。 4 | 5 | 目前还在陆续的开发完善阶段,旨在完成相应功能和优化性能,未来封装抽象想做成友好的可扩展的图片处理类库。 6 | 7 | ### 裁剪 8 | 9 | 仿美图秀秀 10 | 11 | 1. 自由裁剪 done 12 | 2. 比例裁剪 done 13 | 3. 自定义控件裁剪框,支持角、边拖动 done 14 | 4. 自定义控件裁剪框,支持双指缩放 done 15 | 5. 仿美图秀秀 UI done 16 | 17 | ### 旋转 18 | 19 | 仿美图秀秀 20 | 21 | 1. 90度旋转 done 22 | 2. 镜像反转 done 23 | 3. 手指滑动任意角度旋转 todo 24 | 25 | ### 贴纸 26 | 27 | 仿 in 28 | 29 | 1. 自定义控件,贴纸浮层 done 30 | 1. 右下角触控,贴纸放大,旋转 done 31 | 2. 双指触控,贴纸放大,旋转 done 32 | 3. 单指触控,贴纸移动 done 33 | 4. 支持自定义贴纸 menu done 34 | 5. 内置贴纸 menu,镜像垂直反转,镜像水平反转,镜像双向,反转,删除 done 35 | 6. 自动提升功能,贴纸覆盖在一起时可以上下循环切换,可配置开启 done 36 | 7. 贴纸位置,缩放比例,最大最小缩放可配置 done 37 | 8. 贴纸变色,支持变为纯色 done 38 | 9. 支持贴纸真删,假删,回收资源等 done 39 | 10. 贴纸贴上之后波动一下动画,部分完成,现在支持设置 initScale = 1 时 done 40 | 11. 仿 in UI todo 41 | 42 | ### 涂鸦 43 | 44 | 我们常见的马赛克是涂鸦的一种类型,这里不仅仅是马赛克。 45 | 46 | 1. 支持手势路径绘制 done 47 | 2. 支持拖动矩形区域绘制 done 48 | 3. 马赛克模式 done 49 | 4. 高斯模糊模式 done 50 | 5. 纯色模式 done 51 | 6. 图片模式 done 52 | 7. poly 模式 done 53 | 8. 支持多层涂鸦 done 54 | 55 | 56 | ### 滤镜 57 | 58 | 59 | ### 虚化 60 | 61 | 62 | ### 大头 63 | 64 | -------------------------------------------------------------------------------- /app/src/main/res/layout/edit_crop_mode_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 20 | 21 | 29 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | 11 | # Local configuration file (sdk path, etc) 12 | local.properties 13 | 14 | # Proguard folder generated by Eclipse 15 | proguard/ 16 | 17 | # Intellij project files 18 | *.iml 19 | *.ipr 20 | *.iws 21 | .idea/ 22 | 23 | # Gradle files 24 | .gradle/ 25 | gradle/ 26 | build/ 27 | gradle.properties 28 | gradlew 29 | gradlew.bat 30 | 31 | #Android Studio 32 | build/ 33 | */build/ 34 | captures/ 35 | 36 | # built application files 37 | *.apk 38 | *.ap_ 39 | 40 | # files for the dex VM 41 | *.dex 42 | 43 | # Java class files 44 | *.class 45 | 46 | # Eclipse generated files 47 | */bin/ 48 | */gen/ 49 | */out/ 50 | .classpath 51 | .project 52 | .settings/ 53 | 54 | # OSX files 55 | .DS_Store 56 | 57 | # Log Files 58 | *.log 59 | 60 | # Other 61 | .svn 62 | *.properties 63 | 64 | #freeline 65 | freeline.* 66 | freeline.zip 67 | freeline/ 68 | freeline.zip.tmp 69 | freeline_project_description.json 70 | *.zip 71 | .flowconfig 72 | 73 | node_modules/ 74 | 75 | -------------------------------------------------------------------------------- /app/src/main/java/com/march/picedit/sticker/ResourceFactory.java: -------------------------------------------------------------------------------- 1 | package com.march.picedit.sticker; 2 | 3 | import android.content.Context; 4 | import android.graphics.BitmapFactory; 5 | import android.graphics.drawable.BitmapDrawable; 6 | import android.graphics.drawable.Drawable; 7 | import android.support.v4.util.SparseArrayCompat; 8 | 9 | /** 10 | * CreateAt : 7/21/17 11 | * Describe : 12 | * 13 | * @author chendong 14 | */ 15 | public class ResourceFactory { 16 | 17 | private SparseArrayCompat mMenuIconMap; 18 | private Context mContext; 19 | 20 | public ResourceFactory(Context context) { 21 | mContext = context; 22 | mMenuIconMap = new SparseArrayCompat<>(); 23 | } 24 | 25 | 26 | public Drawable decodeDrawable(int res) { 27 | Drawable drawable = mMenuIconMap.get(res); 28 | if (drawable == null) { 29 | drawable = new BitmapDrawable(mContext.getResources(), BitmapFactory.decodeResource(mContext.getResources(), res)); 30 | mMenuIconMap.put(res, drawable); 31 | } else { 32 | // LogUtils.e(TAG, "使用已有图片"); 33 | } 34 | return drawable; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /piceditor/src/main/java/com/march/piceditor/utils/ViewUtils.java: -------------------------------------------------------------------------------- 1 | package com.march.piceditor.utils; 2 | 3 | import android.graphics.drawable.Drawable; 4 | import android.os.Build; 5 | 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | 9 | /** 10 | * CreateAt : 2017/11/29 11 | * Describe : 12 | * 13 | * @author chendong 14 | */ 15 | public class ViewUtils { 16 | 17 | public static void setBackground( View view, Drawable drawable) { 18 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) 19 | view.setBackground(drawable); 20 | else 21 | view.setBackgroundDrawable(drawable); 22 | } 23 | 24 | 25 | public static void setVisibility( View view, int visibility) { 26 | if (view.getVisibility() != visibility) { 27 | view.setVisibility(visibility); 28 | } 29 | } 30 | 31 | public static void setLayoutParam(int width, int height, View... views) { 32 | ViewGroup.LayoutParams layoutParams; 33 | for (View view : views) { 34 | layoutParams = view.getLayoutParams(); 35 | layoutParams.width = width; 36 | layoutParams.height = height; 37 | view.setLayoutParams(layoutParams); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/march/picedit/PicEditActivity.java: -------------------------------------------------------------------------------- 1 | package com.march.picedit; 2 | 3 | import android.graphics.BitmapFactory; 4 | 5 | import com.bumptech.glide.Glide; 6 | import com.bumptech.glide.request.animation.GlideAnimation; 7 | import com.bumptech.glide.request.target.SimpleTarget; 8 | import com.march.picedit.sticker.StickerSourceActivity; 9 | import com.march.uikit.app.BaseActivity; 10 | 11 | import org.greenrobot.eventbus.EventBus; 12 | import org.greenrobot.eventbus.Subscribe; 13 | import org.greenrobot.eventbus.ThreadMode; 14 | 15 | import java.io.File; 16 | 17 | import butterknife.ButterKnife; 18 | 19 | /** 20 | * CreateAt : 2018/5/23 21 | * Describe : 22 | * 23 | * @author chendong 24 | */ 25 | 26 | public class PicEditActivity extends BaseActivity{ 27 | 28 | @Override 29 | public void initAfterViewCreated() { 30 | super.initAfterViewCreated(); 31 | ButterKnife.bind(this); 32 | EventBus.getDefault().register(this); 33 | 34 | } 35 | 36 | 37 | @Override 38 | public void onDestroy() { 39 | super.onDestroy(); 40 | EventBus.getDefault().unregister(this); 41 | } 42 | 43 | @Subscribe(threadMode = ThreadMode.MAIN) 44 | public void onEvent(PicEditActivity event) { 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/home_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 |