A TagView library for Android. Customize your own & Drag effect.

Related tags

UI/UX AndroidTagView
Overview

AndroidTagView

Build Status Android Arsenal

An Android TagView library. You can customize awesome TagView by using this library.

Screenshots

androidtagview_record_1.gif device-2016-11-09-223523.png

Usage

Step 1

Add below dependency in your build.gradle file.

dependencies {
    implementation 'co.lujun:androidtagview:1.1.7'
    implementation 'androidx.appcompat:appcompat:1.0.1'
}

Step 2

Use the AndroidTagView in layout file, you can add customized attributes here.

<co.lujun.androidtagview.TagContainerLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="0dp"
    android:padding="10dp"
    app:container_enable_drag="false"
    app:horizontal_interval="10dp"
    app:vertical_interval="10dp"
    app:tag_clickable="true"
    app:tag_theme="pure_teal" />

Step 3

Use TagView in your code.

TagContainerLayout mTagContainerLayout = (TagContainerLayout) findViewById(R.id.tagcontainerLayout);
mTagContainerLayout.setTags(List<String> tags);

Now, you have successfully created some TagViews. The following will show some more useful features for you customize.

Attributes

name format description
vertical_interval dimension Vertical interval, default 5(dp)
horizontal_interval dimension Horizontal interval, default 5(dp)
container_border_width dimension TagContainerLayout border width(default 0.5dp)
container_border_radius dimension TagContainerLayout border radius(default 10.0dp)
container_border_color color TagContainerLayout border color(default #22FF0000)
container_background_color color TagContainerLayout background color(default #11FF0000)
container_enable_drag boolean Can drag TagView(default false)
container_drag_sensitivity float The sensitive of the ViewDragHelper(default 1.0f, normal)
container_gravity enum The TagContainerLayout gravity
container_max_lines integer The max lines for TagContainerLayout(default 0, auto increase)
tag_border_width dimension TagView Border width(default 0.5dp)
tag_corner_radius dimension TagView Border radius(default 15.0dp)
tag_horizontal_padding dimension Horizontal padding for TagView, include left and right padding(left and right padding are equal, default 10dp)
tag_vertical_padding dimension Vertical padding for TagView, include top and bottom padding(top and bottom padding are equal, default 8dp)
tag_text_size dimension TagView Text size(default 14sp)
tag_bd_distance dimension The distance between baseline and descent(default 2.75dp)
tag_text_color color TagView text color(default #FF666666)
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 false)
tag_selectable boolean Whether TagView can be selectable(default false)
tag_theme enum The TagView theme
tag_text_direction enum The TagView text direction
tag_ripple_color color The ripple effect color(default #EEEEEE)
tag_ripple_alpha integer The ripple effect color alpha(the value may between 0 - 255, default 128)
tag_ripple_duration integer The ripple effect duration(In milliseconds, default 1000ms)
tag_enable_cross boolean Enable draw cross icon(default false)
tag_cross_width dimension The cross area width(your cross click area, default equal to the TagView's height)
tag_cross_color color The cross icon color(default Color.BLACK)
tag_cross_line_width dimension The cross line width(default 1dp)
tag_cross_area_padding dimension The padding of the cross area(default 10dp)
tag_support_letters_rlt boolean Whether to support 'letters show with RTL(eg: Android -> diordnA)' style(default false)
tag_background reference TagView background resource(default none background)

You can set these attributes in layout file, or use setters(each attribute has get and set method) to set them.

Themes

theme code value description
none ColorFactory.NONE -1 If you customize TagView with your way, set this theme
random ColorFactory.RANDOM 0 Create each TagView using random color
pure_cyan ColorFactory.PURE_CYAN 1 All TagView created by pure cyan color
pure_teal ColorFactory.PURE_TEAL 2 All TagView created by pure teal color

Directions

direction code value description
ltr View.TEXT_DIRECTION_LTR 3 Text direction is forced to LTR(default)
rtl View.TEXT_DIRECTION_RTL 4 Text direction is forced to RTL

Gravity

gravity code value description
left Gravity.LEFT 3 Push TagView to the left of TagContainerLayout(default)
center Gravity.CENTER 17 Push TagView to the center of TagContainerLayout
right Gravity.RIGHT 5 Push TagView to the right of TagContainerLayout

Methods

  • Set a TagView.OnTagClickListener for TagView, for onTagClick , onTagLongClick and onTagCrossClick callback
mTagContainerLayout.setOnTagClickListener(new TagView.OnTagClickListener() {

    @Override
    public void onTagClick(int position, String text) {
        // ...
    }

    @Override
    public void onTagLongClick(final int position, String text) {
        // ...
    }

    @Override
    public void onSelectedTagDrag(int position, String text){
        // ...
    }
    
    @Override
    public void onTagCrossClick(int position) {
        // ...
    }
});
  • Use setTagMaxLength(int max) to set text max length for all TagView.
mTagContainerLayout.setTagMaxLength(int max);
  • Use getTagText(int position) to get TagView text at the specified location.
String text = mTagContainerLayout.getTagText(int position);
  • getTags() return a string list for all tags in TagContainerLayout.
List<String> list = mTagContainerLayout.getTags();
  • If you set the attribute container_enable_drag to true, when drag the TagView you can get latest state by using getTagViewState(). There are 4 state:ViewDragHelper.STATE_IDLE, ViewDragHelper.STATE_DRAGGING, and ViewDragHelper.STATE_SETTLING.
int state = mTagContainerLayout.getTagViewState();
  • Set the theme. If you want to customize theme, remember set theme with ColorFactory.NONE first, then set other attributes.
// Set library provides theme
mTagContainerLayout.setTheme(ColorFactory.PURE_CYAN);
// Set customize theme
mTagContainerLayout.setTheme(ColorFactory.NONE);
mTagContainerLayout.setTagBackgroundColor(Color.TRANSPARENT);
  • Set the text direction. The library support two direction View.TEXT_DIRECTION_LTR and View.TEXT_DIRECTION_RTL.
mTagContainerLayout.setTagTextDirection(View.TEXT_DIRECTION_RTL);
  • Use setTagTypeface(Typeface typeface) to set TagView text typeface.
Typeface typeface = Typeface.createFromAsset(getAssets(), "iran_sans.ttf");
mTagContainerLayout.setTagTypeface(typeface);

After set the attributes, set tags or add a tag.

  • Use setTags() to set tags, require a parameter of type List<String> or String[].
mTagContainerLayout.setTags(List<String> tags);
  • Insert a TagView into ContainerLayout at the end.
mTagContainerLayout.addTag(String text);
  • Insert a TagView into ContainerLayout at the specified location, the TagView is inserted before the current element at the specified location.
mTagContainerLayout.addTag(String text, int position);
  • Remove TagView on particular position, require the position of the TagView.
mTagContainerLayout.removeTag(int position);
  • Remove all TagViews.
mTagContainerLayout.removeAllTags();
  • Get a TagView in specified position.
mTagContainerLayout.getTagView(int position);
  • Set color for each TagView.
List<int[]> colors = new ArrayList<int[]>();
//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);

Change logs

1.1.7(2019-01-21)

  • Fix bugs

1.1.6(2018-12-1)

  • Support tag selectable

1.1.5(2018-8-20)

  • Allow images on tags (in LTR languages).

1.1.4(2017-6-1)

  • Add attribute for TagView background.

1.1.3(2017-5-17)

  • Add getTagView(int position) method to get TagView in specified position.

1.1.2(2017-5-16)

  • Fix bugs

1.1.1(2017-4-16)

  • Customize the color of the TagView, see #51
  • Fixed issue #50, #49

1.1.0(2017-3-5)

  • Fixed issue #45
  • Support 'letters show with RTL(eg: Android -> diordnA)' style

1.0.6(2017-2-14)

  • Fix bugs

1.0.5(2016-11-9)

  • Add cross view for TagView

1.0.4(2016-10-30)

1.0.3(2016-4-3)

  • Add getTags() method to get the list for all tags
  • Fixed bugs in ListView/RecyclerView

1.0.2(2016-1-18)

  • Support gravity for TagContainerLayout
  • Support set typeface

1.0.1(2016-1-14)

  • Support text direction
  • Add removeAllTags() method for remove all TagViews
  • Fixed issue #1
  • Fixed other bugs

1.0.0(2016-1-6)

  • First release

Sample App

APK

About

If you have any questions, contact me: lujun.byte#gmail.com.

License

Copyright 2015 lujun

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • java.lang.NullPointerException: Attempt to invoke interface method 'void android.view.ViewParent.requestDisallowInterceptTouchEvent(boolean)' on a null object reference

    java.lang.NullPointerException: Attempt to invoke interface method 'void android.view.ViewParent.requestDisallowInterceptTouchEvent(boolean)' on a null object reference

    When I delete a tag and immediately click on the tagContainerLayout which was holding that tag then the app crash with the above error. I am posting my full stack trace hope it will help in resolving the issue. Full error stack trace : 12-02 14:08:26.341 21385-21385/com.demo.app E/InputEventReceiver: Exception dispatching input event. 12-02 14:08:26.343 21385-21385/com.demo.app E/UncaughtException: java.lang.NullPointerException: Attempt to invoke interface method 'void android.view.ViewParent.requestDisallowInterceptTouchEvent(boolean)' on a null object reference at co.lujun.androidtagview.b.dispatchTouchEvent(SourceFile:228) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2553) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254) at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2403) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1737) at android.app.Activity.dispatchTouchEvent(Activity.java:2771) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:63) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(SourceFile:63) at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364) at android.view.View.dispatchPointerEvent(View.java:9520) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922) at ``android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)

    opened by ChetanAshtivkar 10
  • Query : How to change background color or set background drawable to a specific TAG for onClick event

    Query : How to change background color or set background drawable to a specific TAG for onClick event

    I want to set different drawable/color to a specific tag on onClick on that tag. Pls suggest me the way to do so.

    Below is my code:

    xml:

          app:container_border_color="@android:color/transparent"
            app:container_background_color="@android:color/transparent"
            app:tag_background_color="@android:color/transparent"
            app:tag_border_color="@color/deep_rose_two"
            app:container_enable_drag="false"
            app:horizontal_interval="10dp"
            app:tag_clickable="true"
            app:tag_text_color="@color/black"
            app:tag_text_size="12sp"
            app:tag_theme="none"
            app:vertical_interval="10dp"
    

    Code:

         for (int i = 0; i < 10; i++) {
               tags.add("Tag " + (i + 1));
           }
           List<int[]> colors = new ArrayList<int[]>();
           tagContainer.setTags(tags, colors);
           tagContainer.setOnTagClickListener(new TagView.OnTagClickListener() {
            
         @Override
               public void onTagClick(int position, String text) {
                 Log.d(TAG, "onTagClick: position: "+position+", text: "+text);
             tagContainer.setTagBackgroundColor(getResources().getColor(R.color.deep_rose_two));
                   tagContainer.setTagTextColor(getResources().getColor(R.color.white));
            }
    
            @Override
               public void onTagLongClick(final int position, String text) {
              }
    
               @Override
               public void onTagCrossClick(int position) {
              }
           });
    
    opened by pravingaikwad07 7
  • UnsupportedOperationException GLES20Canvas.clipPath in 4.0

    UnsupportedOperationException GLES20Canvas.clipPath in 4.0

    1 android.view.GLES20Canvas.clipPath(GLES20Canvas.java:424)
    2 co.lujun.androidtagview.TagView.void drawRipple(android.graphics.Canvas)(SourceFile:329)
    3 co.lujun.androidtagview.TagView.void onDraw(android.graphics.Canvas)(SourceFile:189)
    4 android.view.View.draw(View.java:10988)
    5 android.view.View.getDisplayList(View.java:10427)
    6 android.view.ViewGroup.drawChild(ViewGroup.java:2850)
    7 android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
    8 android.view.View.draw(View.java:10991)
    9 android.view.View.getDisplayList(View.java:10427)
    10 android.view.ViewGroup.drawChild(ViewGroup.java:2850)
    11 android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
    12 android.view.View.getDisplayList(View.java:10425)
    13 android.view.ViewGroup.drawChild(ViewGroup.java:2850)
    14 android.support.v7.widget.RecyclerView.drawChild(SourceFile:3838)
    15 android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489)
    
    enhancement 
    opened by 0kai 5
  • 中文好像没有居中?

    中文好像没有居中?

    中文好像没有居中,而且文字的tag_vertical_padding效果好像不对,我写了一个textview,设置一个shape,这样看起来才是符合预期的效果。 Uploading device-2016-01-12-223814.png…

    我是这样设置的:

    <co.lujun.androidtagview.TagContainerLayout
            android:layout_marginTop="16dp"
            android:id="@+id/tagcontainerLayout1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            app:container_border_width="0dp"
            app:container_border_radius="0dp"
            app:container_border_color="#ffffff"
            app:container_background_color="#ffffff"
            app:container_enable_drag="false"
            app:horizontal_interval="12dp"
            app:vertical_interval="12dp"
            app:tag_clickable="true"
            app:tag_theme="none"
            app:tag_border_width="1dp"
            app:tag_corner_radius="50dp"
            app:tag_horizontal_padding="16dp"
            app:tag_vertical_padding="5dp"
            app:tag_text_size="14dp"
            app:tag_text_color="#3ea2ef"
            app:tag_border_color="#3ea2ef"
            app:tag_background_color="#ffffff"
             />
    
    <TextView
            android:layout_margin="20dp"
            android:gravity="center"
            android:textSize="14sp"
            android:textColor="#3ea2ef"
            android:text="平面设计"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:paddingBottom="5dp"
            android:paddingTop="5dp"
            android:background="@drawable/shape_re"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    
    <?xml version="1.0" encoding="utf-8"?>
    <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
        <solid android:color="#ffffff"/>
        <stroke android:color="#3ea2ef"
                android:width="1dp"/>
        <corners android:radius="50dp"/>
    </shape>
    
    bug 
    opened by GalvinChen 5
  • Gradle Error: Error:Cannot create variant 'android-lint' after configuration ':androidtagview:debugRuntimeElements' has been resolved

    Gradle Error: Error:Cannot create variant 'android-lint' after configuration ':androidtagview:debugRuntimeElements' has been resolved

    Hallo i have android studio 3.0.1 with classpath 'com.android.tools.build:gradle:3.1.3 and distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip and am trying to run the code but i am getting this error: Cannot create variant 'android-lint' after configuration ':flexible-adapter:debugRuntimeElements' has been resolved.

    any idea, how to solve it?

    If I am trying to run with classpath 'com.android.tools.build:gradle:3.0.1' and distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip then It is working fine.

    opened by Nik2505 4
  • container_background_color

    container_background_color

    want to change container_background_color run time programming used tagView.setBackgroundColor(); but cant change the color. any diffrent way to change dynamic color for this?

    opened by Ni3Narale 4
  • 文字无法居中啊,而且1.06版好像和FloatingActionButton的resource有冲突

    文字无法居中啊,而且1.06版好像和FloatingActionButton的resource有冲突

    1.06版好像和FloatingActionButton的resource有冲突,改成1.06版就无法编译通过,1.05可以,怀疑colorAccent是不是重名了? s70228-205215

    <co.lujun.androidtagview.TagContainerLayout
                android:id="@+id/tag_history"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/dp_18"
                app:container_background_color="@color/white"
                app:container_border_color="@color/white"
                app:tag_border_color="@color/grey_7f7f7f"
                app:tag_background_color="@color/white"
                app:tag_text_color="@color/grey_7f7f7f"
                app:tag_theme="none"
                app:tag_clickable="true"
                app:horizontal_interval="@dimen/dp_8"
                app:tag_horizontal_padding="@dimen/dp_6"
                app:tag_vertical_padding="@dimen/dp_5"
                app:tag_corner_radius="@dimen/dp_2" />
    
    opened by lvyandev 4
  • Not able to change the tagTextColor or tagBackgroundColor

    Not able to change the tagTextColor or tagBackgroundColor

    All the provided methods are not working for changing the tag text color.

    i tried using

    
     mTagContainerLayout.setTagBorderColor(Color.WHITE);
    
     mTagContainerLayout.setTagTextColor(Color.WHITE);
    
    mTagContainerLayout.setTagBackgroundColor(Color.TRANSPARENT);
    

    even i tried changing the default values.

     /** TagView border color(default #88F44336)*/
        private int mTagBorderColor = Color.WHITE;
    
        /** TagView background color(default #33F44336)*/
        private int mTagBackgroundColor =  Color.TRANSPARENT;
    
        /** TagView text color(default #FF666666)*/
        private int mTagTextColor =  Color.WHITE;
    

    i am still getting the default background color for every tag.

    Thanks!

    opened by nieldeokar 3
  • Cross Size problem

    Cross Size problem

    Hello there, Thanks for developing such a great library, I have a problem when the Cross on a Tagview is Enabled, the Text of that Tag extends the size of the Tag and some Characters of it won't be shown. So I can't set a padding on the Tagview so that with Cross enabled All the Text could be shown. What Should I do ?

    opened by hoseinit 2
  • Cross button should listen for on release instead of on press/hover

    Cross button should listen for on release instead of on press/hover

    Hello and thank you for your great work.

    I have seen that the cross button (remove tag) is listening for on press instead of on release and I believe that it could create issues for users like for example, if the user is trying to hover over the view to be able to scroll and there is no dialog to confirm the removal (yes/no) attached to the cross button, the tag will get removed instantly.

    Thanks.

    enhancement 
    opened by dcgavril 2
  • Different colors for different tags

    Different colors for different tags

    Does this support different colors for different tags?

    I could not find it, so made some adjustments which allows you to pass a color array with the tags array, and sets different colors for different tags.

    Do you accept pull requests? I can pass on the code? screenshot

    opened by anantshah93 2
  • Tag Ripple not working

    Tag Ripple not working

    Screenshot_20220707-113540

    I'm trying to add ripple to my tag items but it's not working. I tried to add resource to container layout using app:tag_background="@drawable/res" but it didn't work.

    opened by neilbishop324 0
  • mavenCentral() support

    mavenCentral() support

    Android Studio 4.2 suggests change jcenter() to mavenCentral(). Will mavenCentral() be supported at future updates?

    https://developer.android.com/studio/build/jcenter-migration

    opened by berkaksoyyy 2
  • How to remove cross icon for specific tag?

    How to remove cross icon for specific tag?

    First of thanks for this wonderful library for tag view.

    I don't want a cross icon on my first or specific tag example mention below.

    @BindView(R.id.tagVie) TagContainerLayout tagViewAPRes; ArrayList<String> peopleList = new ArrayList<>();

    peopleList.add("+Add peoples"); peopleList.add("Abd"); peopleList.add("def"); peopleList.add("hig");

    tagVie.setOnTagClickListener(new TagView.OnTagClickListener() { @Override public void onTagClick(int position, String text) { Toast.makeText(MinutesOfMeetingActivity.this, "click-position:" + position + ", text:" + text, Toast.LENGTH_SHORT).show(); }

                @Override
                public void onTagLongClick(final int position, String text) {
    
                }
    
                @Override
                public void onSelectedTagDrag(int position, String text) {
                }
    
                @Override
                public void onTagCrossClick(int position) {
                    String strTagName = "";
                    strTagName=peopleList.get(position);
                    if (momDetailViewsItemArrayList != null && momDetailViewsItemArrayList.isEmpty()) {
                        if (!strTagName.equals("+Add peoples"))){
                            tagViewAPRes.removeTag(position);
                        }
                    }
                }
            });`
    

    In the above code I prevent that tag from remove but still cross the icon over there, is there any way to remove that icon?

    opened by ArbazIn 0
Releases(v1.1.7)
Owner
lujun
lujun
Android view that allows the user to create drawings. Customize settings like color, width or tools. Undo or redo actions. Zoom into DrawView and add a background.

DrawView Android view that allows the user to create drawings. Draw anything you like in your Android device from simple view. Customize draw settings

Oscar Gilberto Medina Cruz 839 Dec 28, 2022
Android ListView with drag and drop reordering.

DragSortListView NOTICE: No longer maintained. I do not have much time to devote to this project so I am dropping support for the time being. Sorry ev

Carl A. Bauer 3.2k Jan 6, 2023
Drag and drop to reorder items in a list, grid or board for Android. Based on RecyclerView. Also supports swiping items in a list.

DragListView DragListView can be used when you want to be able to re-order items in a list, grid or a board. It also supports horizontal swiping of it

Magnus Woxblom 658 Nov 30, 2022
Janishar Ali 2.1k Jan 1, 2023
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Enrique López Mañas 3.6k Dec 29, 2022
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
Android ImageViews animated by Ken Burns Effect

KenBurnsView Android library that provides an extension to ImageView that creates an immersive experience by animating its drawable using the Ken Burn

Flávio Faria 2.7k Dec 23, 2022
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

D_clock爱吃葱花 316 Nov 29, 2022
This is a picker view for android , support linkage effect, timepicker and optionspicker.(时间选择器、省市区三级联动)

Android-PickerView English Document 注意事项、详请使用方式、更新日志等,请查看 Wiki文档 Wiki文档,Wiki文档,Wiki文档 !~ 重要的事情说三遍 对于使用上有任何疑问或优化建议等,欢迎加入QQ群讨论交流技术问题。 交流群1: 387051294(推荐

Bigkoo 13.2k Jan 6, 2023
Simple and fantastic wheel view in realistic effect for android.

Overview ![Size](https://img.shields.io/badge/Size-17 KB-e91e63.svg) Contact Preview Demo WheelPicke.APK Include Compile compile 'cn.aigestudio.wheelp

Aige 2.5k Jan 6, 2023
JetCompose - Blur Effect in Android 12 with motion layout carousel

JetCompose Blur Effect in Android 12 with motion layout carousel

Vikas Singh 4 Jul 27, 2022
Glass-break effect for views

BrokenView Glass-break effect for views. Demo Download APK Usage Android Studio dependencies { compile 'com.zys:brokenview:1.0.3' } Eclipse Just pu

null 858 Jan 6, 2023
Pop animation with circular dust effect for any view updation

Popview-Android Pop animation with circular dust effect for any view updation Getting Started In your build.gradle dependencies { compile 'rb.popv

R B Krishna 489 Dec 28, 2022
An Index Side Bar With Wave Effect

WaveSideBar You can use WaveSideBar in the contacts page of your application. Refer to AlexLiuSheng/AnimSideBar. Screenshot Include the WaveSideBar to

郭佳哲 1.3k Dec 12, 2022
Squishy button effect with kotlin

Squishy Usage Add squishy() modifier on your composable element. Text( text = "Squishhhhyyyyy", modifier = Modifier .size(200.dp, 100.dp

null 43 Jul 9, 2022
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Shashank Singhal 350 Dec 9, 2022