diff --git a/README.md b/README.md index bd1e26e..a7c9a39 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add below dependency in your **build.gradle** file. ```groovy dependencies { - compile 'co.lujun:androidtagview:1.1.5' + compile 'co.lujun:androidtagview:1.1.6' } ``` @@ -72,7 +72,8 @@ Now, you have successfully created some TagViews. The following will show some m | tag_border_color | color | TagView border color(default #88F44336) | tag_background_color | color | TagView background color(default #33F44336) | tag_max_length | integer | The max length for TagView(default max length 23) -| tag_clickable | boolean | Whether TagView can clickable(default unclickable) +| tag_clickable | boolean | Whether TagView can clickable(default false) +| tag_selectable | boolean | Whether TagView can be selectable(default false) | tag_theme | enum | The TagView [theme](#themes) | tag_text_direction | enum | The TagView text [direction](#directions) | tag_ripple_color | color | The ripple effect color(default #EEEEEE) @@ -127,6 +128,11 @@ mTagContainerLayout.setOnTagClickListener(new TagView.OnTagClickListener() { public void onTagLongClick(final int position, String text) { // ... } + + @Override + public void onSelectedTagDrag(int position, String text){ + // ... + } @Override public void onTagCrossClick(int position) { @@ -209,6 +215,9 @@ mTagcontainerLayout.setTags(tags, colors); ## Change logs +### 1.1.6(2018-12-1) +- Support tag selectable + ### 1.1.5(2018-8-20) - Allow images on tags (in LTR languages). diff --git a/androidtagview/build.gradle b/androidtagview/build.gradle index c1af273..3ff997c 100644 --- a/androidtagview/build.gradle +++ b/androidtagview/build.gradle @@ -6,8 +6,8 @@ android { defaultConfig { minSdkVersion 21 targetSdkVersion 28 - versionCode 115 - versionName "1.1.5" + versionCode 116 + versionName "1.1.6" } buildTypes { release { @@ -22,6 +22,4 @@ dependencies { testImplementation 'junit:junit:4.12' implementation 'androidx.appcompat:appcompat:1.0.1' } -//TODO fix bug apply from: 'https://raw.githubusercontent.com/whilu/AndroidPublishLibrary/master/project/library/bintray_publish.gradle' -//https://github.com/google/ExoPlayer/commit/13592dfb53ec99ce1fdb2744e34717dbdec9dea8 -//https://github.com/davideas/FlexibleAdapter/issues/579 \ No newline at end of file +apply from: 'https://raw.githubusercontent.com/whilu/AndroidPublishLibrary/master/project/library/bintray_publish.gradle' \ No newline at end of file diff --git a/androidtagview/src/main/java/co/lujun/androidtagview/Utils.java b/androidtagview/src/main/java/co/lujun/androidtagview/Utils.java index 012b6ab..c2b68de 100644 --- a/androidtagview/src/main/java/co/lujun/androidtagview/Utils.java +++ b/androidtagview/src/main/java/co/lujun/androidtagview/Utils.java @@ -37,10 +37,10 @@ public static float sp2px(Context context, float sp) { } /** - * If the color is Dark -> make it lighter and vice versa + * If the color is Dark, make it lighter and vice versa * * @param color in int, - * @param factor 0.0 < factor < 1.0 + * @param factor The factor greater than 0.0 and smaller than 1.0 * @return int */ public static int manipulateColorBrightness(int color, float factor) {