From b605ccb677298215f320404d372b512fdc8968ee Mon Sep 17 00:00:00 2001 From: wuapnjie Date: Tue, 25 Apr 2017 23:31:39 +0800 Subject: [PATCH] upgrade to 1.6.0 --- README.md | 3 ++- build.gradle | 4 ++-- gradle.properties | 4 ++-- sticker/build.gradle | 11 ++++++++--- .../com/xiaopo/flying/sticker/BitmapStickerIcon.java | 1 - .../xiaopo/flying/sticker/FlipHorizontallyEvent.java | 2 -- .../xiaopo/flying/sticker/FlipVerticallyEvent.java | 2 -- .../main/java/com/xiaopo/flying/sticker/Sticker.java | 1 - .../java/com/xiaopo/flying/sticker/StickerUtils.java | 1 - .../java/com/xiaopo/flying/sticker/StickerView.java | 12 ++---------- .../java/com/xiaopo/flying/sticker/TextSticker.java | 1 - 11 files changed, 16 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 7689e5d..760a1aa 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A view which can add sticker and zoom,drag,flip,delete it In your **build.gradle** ```gradle -compile 'com.flying.xiaopo:sticker:1.4.0' +compile 'com.flying.xiaopo:sticker:1.6.0' ``` **Tips**:StickerView extends FrameLayout @@ -67,6 +67,7 @@ stickerView.setIcons(Arrays.asList(deleteIcon, zoomIcon, flipIcon, heartIcon)); * **2016/12/16** Add Double Tap Callback * **2016/12/17** Add Constrain Sticker's move area * **2017/02/07** Custom your icon and icon event +* **2017/04/25** Fix scale err and add more useful function ## Todo - [x] Constrain the sticker's moving area diff --git a/build.gradle b/build.gradle index b2a0f2b..cc41853 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' -// + // classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' // classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // NOTE: Do not place your application dependencies here; they belong @@ -26,6 +26,6 @@ task clean(type: Delete) { } ext { - supportLibraryVersion = '25.1.1' + supportLibraryVersion = '25.3.1' photoViewVersion = 'v1.2.5' } diff --git a/gradle.properties b/gradle.properties index 2ffba59..1e8a55b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,6 +13,6 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true #Thu Jan 26 19:36:53 CST 2017 -systemProp.http.proxyHost=127.0.0.1 +#systemProp.http.proxyHost=127.0.0.1 org.gradle.jvmargs=-Xmx1536m -systemProp.http.proxyPort=1080 +#systemProp.http.proxyPort=1080 diff --git a/sticker/build.gradle b/sticker/build.gradle index cfca05a..81a1dc0 100644 --- a/sticker/build.gradle +++ b/sticker/build.gradle @@ -26,12 +26,11 @@ dependencies { compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" } -// //apply plugin: 'com.android.library' //apply plugin: 'com.github.dcendents.android-maven' //apply plugin: 'com.jfrog.bintray' // -//version = "1.4.0" // #修改# // 这里是aar的版本号 +//version = "1.6.0" // #修改# // 这里是aar的版本号 // //android { // compileSdkVersion 25 @@ -59,7 +58,7 @@ dependencies { //} // //dependencies { -// compile fileTree(dir: 'libs', include: ['*.jar']) +// compile fileTree(include: ['*.jar'], dir: 'libs') // compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" //} // @@ -141,3 +140,9 @@ dependencies { // } //} +tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') + options.addStringOption('encoding', 'UTF-8') + options.addStringOption('charSet', 'UTF-8') +} + diff --git a/sticker/src/main/java/com/xiaopo/flying/sticker/BitmapStickerIcon.java b/sticker/src/main/java/com/xiaopo/flying/sticker/BitmapStickerIcon.java index 4abd281..2fc0925 100644 --- a/sticker/src/main/java/com/xiaopo/flying/sticker/BitmapStickerIcon.java +++ b/sticker/src/main/java/com/xiaopo/flying/sticker/BitmapStickerIcon.java @@ -5,7 +5,6 @@ import android.graphics.drawable.Drawable; import android.support.annotation.IntDef; import android.view.MotionEvent; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/sticker/src/main/java/com/xiaopo/flying/sticker/FlipHorizontallyEvent.java b/sticker/src/main/java/com/xiaopo/flying/sticker/FlipHorizontallyEvent.java index 7776be0..ee917cb 100644 --- a/sticker/src/main/java/com/xiaopo/flying/sticker/FlipHorizontallyEvent.java +++ b/sticker/src/main/java/com/xiaopo/flying/sticker/FlipHorizontallyEvent.java @@ -1,7 +1,5 @@ package com.xiaopo.flying.sticker; -import android.view.MotionEvent; - /** * @author wupanjie */ diff --git a/sticker/src/main/java/com/xiaopo/flying/sticker/FlipVerticallyEvent.java b/sticker/src/main/java/com/xiaopo/flying/sticker/FlipVerticallyEvent.java index 54ba5b2..d303e04 100644 --- a/sticker/src/main/java/com/xiaopo/flying/sticker/FlipVerticallyEvent.java +++ b/sticker/src/main/java/com/xiaopo/flying/sticker/FlipVerticallyEvent.java @@ -1,7 +1,5 @@ package com.xiaopo.flying.sticker; -import android.view.MotionEvent; - /** * @author wupanjie */ diff --git a/sticker/src/main/java/com/xiaopo/flying/sticker/Sticker.java b/sticker/src/main/java/com/xiaopo/flying/sticker/Sticker.java index 9c28f57..3f07f77 100644 --- a/sticker/src/main/java/com/xiaopo/flying/sticker/Sticker.java +++ b/sticker/src/main/java/com/xiaopo/flying/sticker/Sticker.java @@ -9,7 +9,6 @@ import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/sticker/src/main/java/com/xiaopo/flying/sticker/StickerUtils.java b/sticker/src/main/java/com/xiaopo/flying/sticker/StickerUtils.java index f223192..ad50262 100644 --- a/sticker/src/main/java/com/xiaopo/flying/sticker/StickerUtils.java +++ b/sticker/src/main/java/com/xiaopo/flying/sticker/StickerUtils.java @@ -8,7 +8,6 @@ import android.provider.MediaStore; import android.support.annotation.NonNull; import android.util.Log; - import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; diff --git a/sticker/src/main/java/com/xiaopo/flying/sticker/StickerView.java b/sticker/src/main/java/com/xiaopo/flying/sticker/StickerView.java index 4b444dc..a264524 100644 --- a/sticker/src/main/java/com/xiaopo/flying/sticker/StickerView.java +++ b/sticker/src/main/java/com/xiaopo/flying/sticker/StickerView.java @@ -21,7 +21,6 @@ import android.view.MotionEvent; import android.view.ViewConfiguration; import android.widget.FrameLayout; - import java.io.File; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -31,8 +30,8 @@ import java.util.List; /** - * Sticker view - * Created by snowbean on 16-8-2. + * Sticker View + * @author wupanjie */ public class StickerView extends FrameLayout { @@ -80,7 +79,6 @@ public class StickerView extends FrameLayout { private final float[] tmp = new float[2]; private PointF midPoint = new PointF(); // endregion - private final int touchSlop; private BitmapStickerIcon currentIcon; @@ -157,9 +155,6 @@ public void configDefaultIcons() { /** * Swaps sticker at layer [[oldPos]] with the one at layer [[newPos]]. * Does nothing if either of the specified layers doesn't exist. - * - * @param oldPos - * @param newPos */ public void swapLayers(int oldPos, int newPos) { if (stickers.size() >= oldPos && stickers.size() >= newPos) { @@ -171,9 +166,6 @@ public void swapLayers(int oldPos, int newPos) { /** * Sends sticker from layer [[oldPos]] to layer [[newPos]]. * Does nothing if either of the specified layers doesn't exist. - * - * @param oldPos - * @param newPos */ public void sendToLayer(int oldPos, int newPos) { if (stickers.size() >= oldPos && stickers.size() >= newPos) { diff --git a/sticker/src/main/java/com/xiaopo/flying/sticker/TextSticker.java b/sticker/src/main/java/com/xiaopo/flying/sticker/TextSticker.java index 3b8fb6d..b1f6f3e 100644 --- a/sticker/src/main/java/com/xiaopo/flying/sticker/TextSticker.java +++ b/sticker/src/main/java/com/xiaopo/flying/sticker/TextSticker.java @@ -24,7 +24,6 @@ * See https://adilatwork.blogspot.com/2014/08/android-textview-which-resizes-its-text.html * Notice: It's not efficient to add long text due to too much of * StaticLayout object allocation. - *

* Created by liutao on 30/11/2016. */