From 079dd64c34a7872a87db11d8b5b6625a3ec1249c Mon Sep 17 00:00:00 2001 From: whilu Date: Tue, 12 Mar 2019 00:04:03 +0800 Subject: [PATCH 1/2] Update: README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a45cf78..427ab31 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ Add below dependency in your **build.gradle** file. ```groovy dependencies { - compile 'co.lujun:androidtagview:1.1.7' + implementation 'co.lujun:androidtagview:1.1.7' + implementation 'androidx.appcompat:appcompat:1.0.1' } ``` From 75a3bbadf572a25ad2763f0df9546523dac82027 Mon Sep 17 00:00:00 2001 From: whilu Date: Sat, 16 Mar 2019 23:35:54 +0800 Subject: [PATCH 2/2] Update: README.md --- README.md | 6 +++--- androidtagview/project.properties | 10 ++++++++++ .../src/main/java/co/lujun/sample/MainActivity.java | 12 ++++++------ 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 androidtagview/project.properties diff --git a/README.md b/README.md index 427ab31..6acc61b 100644 --- a/README.md +++ b/README.md @@ -206,9 +206,9 @@ mTagContainerLayout.getTagView(int position); * Set color for each TagView. ```java List colors = new ArrayList(); -//int[] color = {TagBackgroundColor, TabBorderColor, TagTextColor} -int[] color1 = {Color.RED, Color.BLACK, Color.WHITE}; -int[] color2 = {Color.BLUE, Color.BLACK, Color.WHITE}; +//int[] color = {TagBackgroundColor, TabBorderColor, TagTextColor, TagSelectedBackgroundColor} +int[] color1 = {Color.RED, Color.BLACK, Color.WHITE, Color.YELLOW}; +int[] color2 = {Color.BLUE, Color.BLACK, Color.WHITE, Color.YELLOW}; colors.add(color1); colors.add(color2); mTagcontainerLayout.setTags(tags, colors); diff --git a/androidtagview/project.properties b/androidtagview/project.properties new file mode 100644 index 0000000..1a8d96f --- /dev/null +++ b/androidtagview/project.properties @@ -0,0 +1,10 @@ +#project +project.name=AndroidTagView +project.groupId=co.lujun +project.artifactId=androidtagview +project.packaging=aar +project.siteUrl=https://github.com/whilu/AndroidTagView +project.gitUrl=https://github.com/whilu/AndroidTagView.git + +#javadoc +javadoc.name=AndroidTagView \ No newline at end of file diff --git a/sample/src/main/java/co/lujun/sample/MainActivity.java b/sample/src/main/java/co/lujun/sample/MainActivity.java index 7d85640..9399ad4 100644 --- a/sample/src/main/java/co/lujun/sample/MainActivity.java +++ b/sample/src/main/java/co/lujun/sample/MainActivity.java @@ -14,6 +14,11 @@ import android.widget.EditText; import android.widget.Toast; +import com.bumptech.glide.Glide; +import com.bumptech.glide.request.RequestOptions; +import com.bumptech.glide.request.target.SimpleTarget; +import com.bumptech.glide.request.transition.Transition; + import java.util.ArrayList; import java.util.List; @@ -23,11 +28,6 @@ import co.lujun.androidtagview.TagContainerLayout; import co.lujun.androidtagview.TagView; -import com.bumptech.glide.Glide; -import com.bumptech.glide.request.RequestOptions; -import com.bumptech.glide.request.transition.Transition; -import com.bumptech.glide.request.target.SimpleTarget; - public class MainActivity extends AppCompatActivity { private TagContainerLayout mTagContainerLayout1, mTagContainerLayout2, @@ -189,7 +189,7 @@ public void onTagCrossClick(int position) { mTagContainerLayout4.setTags(list4); List colors = new ArrayList(); - //int[]color = {backgroundColor, tagBorderColor, tagTextColor} + //int[]color = {backgroundColor, tagBorderColor, tagTextColor, tagSelectedBackgroundColor} int[] col1 = {Color.parseColor("#ff0000"), Color.parseColor("#000000"), Color.parseColor("#ffffff"), Color.parseColor("#999999")}; int[] col2 = {Color.parseColor("#0000ff"), Color.parseColor("#000000"), Color.parseColor("#ffffff"), Color.parseColor("#999999")};