From 2d48cf0cb935ba0c17db77486af9a5b49f3e2d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Evelio=20Tarazona=20C=C3=A1ceres?= Date: Tue, 30 Dec 2014 15:23:14 -0500 Subject: [PATCH 1/3] Add banner and ignore release directory --- .gitignore | 1 + extras/banner.sketch | Bin 0 -> 40960 bytes 2 files changed, 1 insertion(+) create mode 100644 extras/banner.sketch diff --git a/.gitignore b/.gitignore index 47e4981..3d880e7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ # Generated files bin/ gen/ +release/ # Gradle files .gradle/ diff --git a/extras/banner.sketch b/extras/banner.sketch new file mode 100644 index 0000000000000000000000000000000000000000..71de759aba8d71c21e792290a341aa7d3a37be26 GIT binary patch literal 40960 zcmeHw34BvU+waU-+NMq0wCP6oHf_@-Nwb{foYRfANsH`A%PLUQHnx$rsa;q^@q|qU zR8SE&TmTWl1$Pid+{Il4R|GfQad}-3*Za&#o1{=)eZPCZ@BZ%nB|vk|oH;Yk{GWN2 zd7hclaOOC7pDX(uPfw?_FWZ8$5yq%GI~yUSfPXCf8~jjk!3^HOHx9Z!-K7HQKgy4W zr&Lxa%6brfggzkzLI{Kq2q6$cAcQ~&fe->A1VRXe5C|ac43#Z)0N%lTF|GA1VRXe5C|dg--W;#;Y^x0Y@V~n?dyo>suY&^y=F*V1lT z(M$u4Rp)rR`g(_N76w_<)8kxt@*v&#$|1mB4PYir_B4C?Jo;KsN2}e_)#~c%b+xWo zF@a)6coRBYU2T2s!*>Gk{XymXAp}AQgb)ZJ5JDh?KnQ^l0wDxK2!s#_ zArL|!gg^*^5CS0tLI{Kq`2QFI@49BpCN9}t)#-G1HFtNod;5&W1Mr(pDMZ8XK4noD z`yBiH^t^%K`Sd)G9AodDk>~7bX?H_$V_u)9J09T`x7-tlXQFTvfimEis^+31REjK! zM_2{;ia;bfeFGjRdd;zDf30v2%%o{5`qGj7Fg*p1J_J-8Py#1~)*UyiTF z>+sEZ3%kDtRY;aBn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*Hjec>&I8w)oT?kRky@W-OWqNJjfqST`FqWmIl zQDKq2Xim|>qU(!pDB4hTbJ49u+luZix~u59qK}IHD9$X-D$Xg^6z3NkijBpl;&H`o z#Y>7e6>l!yQoOZzTk-wH4;DXE{Ce?MC1EA{5?hJAWO|9Kq_;#WxxD1YlIzZ|~x^r~xI=8Mz*QcAO zTco>Cw?cP`Zl&%D-CEtYnQy-zv&}Zp$^csD>-k>+?&H8fv zDE(;tSbc}SOW&@qxWIB0mw@V4Py!^eiBhR;e`eEtErJt65Uiy9M52ZgEV~xdd-trt{o6&9TFnWv& zjEjsH81FE?X`)SerhJpuRBY0lU^AJi%rwQc)O3^SanoMYlcr}(&zoL19WWg?!9eI5&3<_Z0UDca-~#`;t4x{mh-**2A_ao6e@UmD(U?XRET+*lKOFZ3}Ey*&gBJ_)^$p zQpY>_UVc4)9e+K)f#1U4!EfX5;&<@(^7ru%@;mum{3HBh{2u;selPz7|0e$qe~3TK zAK^dezv7Sa|Kfk-{}5n1u@EjOgaV-u;(?q{DO3rggh|4DVTo{+uuiyExL(*K+%4QI zJRs~7_6vuF&x9X@pM?{`@4{aqB}R(LVun~O!sZ6CRvaTv6sL-9VwX5yTr6HJUMj8@ zuMjtgTg1D>`^4SiUU8pzP&_PtDIPCl%aY2n%8JYQva+(uvg$H>*|@SPWz)-A$~wvx zmn|>5yli{f!)1HR_LUthJ6!f<*|D#1xXIHjVx+>4D?5OOo^j5B{ zyryzf<-L`=E1$1?vGSG5w<_PQJXHB%<;PW#RqCqLs?sW3RaMp4su@*nRr9JAS6y7S ruIkaMXQ~cVy Date: Tue, 30 Dec 2014 15:26:02 -0500 Subject: [PATCH 2/3] minSdk 7 - Support minSdk 7 - Add used Arrays method to Utils to support 7+ --- README.md | 2 +- .../res/layout/activity_basic_inflate.xml | 2 +- gradle.properties | 4 +-- .../java/com/telly/mrvector/PathParser.java | 5 ++-- .../main/java/com/telly/mrvector/Utils.java | 25 +++++++++++++++++-- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6896d46..1de51d6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Mr. Vector ========== ![Mr. Vector](http://i.imgur.com/ucFr5T7.png) -AKA VectorDrawableCompat: A 14+ backport of [VectorDrawable](https://developer.android.com/reference/android/graphics/drawable/VectorDrawable.html). +AKA VectorDrawableCompat: A 7+ backport of [VectorDrawable](https://developer.android.com/reference/android/graphics/drawable/VectorDrawable.html). ### Demo diff --git a/demo/src/main/res/layout/activity_basic_inflate.xml b/demo/src/main/res/layout/activity_basic_inflate.xml index 7a8bbe2..0aafd04 100644 --- a/demo/src/main/res/layout/activity_basic_inflate.xml +++ b/demo/src/main/res/layout/activity_basic_inflate.xml @@ -25,6 +25,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:background="?android:selectableItemBackground" + android:background="?selectableItemBackground" /> \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1101e44..19dcc48 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ POM_NAME=Mr. Vector Library POM_ARTIFACT_ID=mrvector POM_PACKAGING=aar -POM_DESCRIPTION=Mr. Vector (VectorDrawableCompat): A 14+ backport of VectorDrawable +POM_DESCRIPTION=Mr. Vector (VectorDrawableCompat): A 7+ backport of VectorDrawable POM_URL=https://github.com/telly/MrVector POM_SCM_URL=https://github.com/telly/MrVector POM_SCM_CONNECTION=scm:git@github.com:telly/MrVector.git @@ -17,7 +17,7 @@ POM_LICENCE_DIST=repo POM_DEVELOPER_ID=eveliotc POM_DEVELOPER_NAME=Evelio Tarazona Caceres -ANDROID_BUILD_MIN_SDK_VERSION=14 +ANDROID_BUILD_MIN_SDK_VERSION=7 ANDROID_BUILD_TARGET_SDK_VERSION=21 ANDROID_BUILD_SDK_VERSION=21 ANDROID_BUILD_TOOLS_VERSION=21.1.2 diff --git a/library/src/main/java/com/telly/mrvector/PathParser.java b/library/src/main/java/com/telly/mrvector/PathParser.java index e5220e0..71119b0 100644 --- a/library/src/main/java/com/telly/mrvector/PathParser.java +++ b/library/src/main/java/com/telly/mrvector/PathParser.java @@ -18,7 +18,6 @@ import android.util.Log; import java.util.ArrayList; -import java.util.Arrays; import static android.os.Build.VERSION_CODES.LOLLIPOP; @@ -189,7 +188,7 @@ private static float[] getFloats(String s) { startPosition = endPosition + 1; } } - return Arrays.copyOf(results, count); + return Utils.copyOf(results, count); } catch (NumberFormatException e) { Log.e(LOGTAG, "error in parsing \"" + s + "\""); throw e; @@ -247,7 +246,7 @@ private PathDataNode(char type, float[] params) { private PathDataNode(PathDataNode n) { mType = n.mType; - mParams = Arrays.copyOf(n.mParams, n.mParams.length); + mParams = Utils.copyOf(n.mParams, n.mParams.length); } /** diff --git a/library/src/main/java/com/telly/mrvector/Utils.java b/library/src/main/java/com/telly/mrvector/Utils.java index c068e39..ec73644 100644 --- a/library/src/main/java/com/telly/mrvector/Utils.java +++ b/library/src/main/java/com/telly/mrvector/Utils.java @@ -27,8 +27,6 @@ import android.util.Log; import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Map; import static android.graphics.PorterDuff.Mode; import static android.graphics.PorterDuff.Mode.SRC_IN; @@ -87,6 +85,7 @@ static int getLayoutDirection(Drawable drawable) { * * @hide */ + @TargetApi(Build.VERSION_CODES.HONEYCOMB) static Mode parseTintMode(int value, Mode defaultMode) { switch (value) { case 3: return Mode.SRC_OVER; @@ -133,4 +132,26 @@ static int getChangingConfigurations(TypedArray a) { } return 0; } + + static float[] copyOf(float[] original, int newLength) { + if (newLength < 0) { + throw new NegativeArraySizeException(Integer.toString(newLength)); + } + return copyOfRange(original, 0, newLength); + } + + static float[] copyOfRange(float[] original, int start, int end) { + if (start > end) { + throw new IllegalArgumentException(); + } + int originalLength = original.length; + if (start < 0 || start > originalLength) { + throw new ArrayIndexOutOfBoundsException(); + } + int resultLength = end - start; + int copyLength = Math.min(resultLength, originalLength - start); + float[] result = new float[resultLength]; + System.arraycopy(original, start, result, 0, copyLength); + return result; + } } From 97a654fb142bab78d36e0c91f07364ae85d65345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Evelio=20Tarazona=20C=C3=A1ceres?= Date: Tue, 30 Dec 2014 16:14:03 -0500 Subject: [PATCH 3/3] Update versions, add changelog --- CHANGELOG.md | 7 +++++++ README.md | 4 ++-- gradle.properties | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..44d6480 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +### 0.2.0 +- minSdk 7 + +### 0.1.0 +- First Release +- Basic manual inflate +- minSdk 14 diff --git a/README.md b/README.md index 1de51d6..5412ddd 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ AKA VectorDrawableCompat: A 7+ backport of [VectorDrawable](https://developer.an ### Usage -See demo, at this point latest version is `0.1.0` +See demo, at this point latest version looks like ```groovy -compile 'com.telly:mrvector:(insert latest version)' +compile 'com.telly:mrvector:0.2.0' ``` ### Basic inflate diff --git a/gradle.properties b/gradle.properties index 19dcc48..b832c22 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -VERSION_NAME=0.1.0 -VERSION_CODE=1 +VERSION_NAME=0.2.0 +VERSION_CODE=2 GROUP=com.telly POM_NAME=Mr. Vector Library