Git Product home page Git Product logo

tagview's People

Contributors

bryant1410 avatar cutta avatar goroshevsky avatar nikoyuwono avatar terryjung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tagview's Issues

tag view -single line -hoizontal scroll view

I mean i need tagview ui inside hoizontal scroll view so the labels doesnt go to next line and scrolls inside horizontal scroll view

and other thing is i should be able to set the orientation

e183f768-9699-11e5-8d8b-b9456a222d08

Optimization with adding list of items

In class TagView in method addTags(List<Tag> tags)you do addTag(item);
But what are doing here?

    public void addTag(Tag tag) {
        mTags.add(tag);
        drawTags();
    }

After adding of each tag to addTag you draw tags...
Inside drawTags()
first
removeAllViews();
and then
for (Tag item : mTags)
Are you jokking? Why if you are going to remove and redraw all, you do it after adding of each element to inner list?
Sorry guys but it have to be optimized!

Tag unique ID

Hello,

Could you please add an optional string property to the Tag object, called "uniqueID" or something like that, so I can use this to tell the difference between two tags with the same text (users with the same display name)?

Thanks!

Setting android:background property to a color results in blank tags

If you set the background color of the TagView the tags are not drawn properly and it shows completely blank. The tags are there, because the TagView is using the correct space, but they are just not drawn correctly.

Here is the XML:

<com.cunoraz.tagview.TagView
    xmlns:tagview="http://schemas.android.com/apk/res-auto"
    android:id="@+id/tagsDanceStyles"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    style="@style/ProfileEditPaddings"
    tagview:lineMargin="5dp"
    tagview:tagMargin="5dp"
    tagview:textPaddingLeft="8dp"
    tagview:textPaddingTop="5dp"
    tagview:textPaddingRight="8dp"
    tagview:textPaddingBottom="5dp" />
<com.cunoraz.tagview.TagView
    xmlns:tagview="http://schemas.android.com/apk/res-auto"
    android:id="@+id/tagsDanceStylesEdit"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    style="@style/ProfileEditPaddings"
    android:background="@color/red_500"
    tagview:lineMargin="5dp"
    tagview:tagMargin="5dp"
    tagview:textPaddingLeft="8dp"
    tagview:textPaddingTop="5dp"
    tagview:textPaddingRight="8dp"
    tagview:textPaddingBottom="5dp" />

Here is how I fill both Tag Views:

for (DanceStyle style : DanceStyles.all()) {
    Tag tag = new Tag(style.name);
    //tag.tagTextColor = getResources().getColor(R.color.editHeaderText);
    tag.layoutColor = getResources().getColor(style.resColor);
    tag.radius = 20f;
    danceStyles.addTag(tag);
    danceStylesEdit.addTag(tag);
}

And this is the result:

tagview-blank

You can see that despite both Tag Views being filled exactly the same way, the one with the background property set draws no tags... Maybe the tags are "bellow" the background...

LocalVariable why?

See no need of creation additional local variable targetTag.

deletableView.setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        if (mDeleteListener != null) {
                            Tag targetTag = tag;
                            mDeleteListener.onTagDeleted(TagView.this, targetTag, position);
                        }
                    }
                });

Recustion with onDraw

I don't know why and why there are no such effect on example, but In my test of view, even I do as your app but from empty project I have infinity recursion

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        drawTags();
    }

run drawTags(); which run removeAllViews(); which run invalidate(true); which run onDraw

and again again again

TagViews doesn't display any tags

Hi guys, I'm trying to add Tag on a TagView. I know how to do that, I have a particular problem : I'm trying to add Tags dynamically to a TagView but when I do that it doesn't display any tags. I'm debugging and print some Logs in order to know if inside the TagView there are any tags. I know for sure there are, so the problem isn't the Tags themself, I think there is a problem with XML. I've another TagView and with them I've noticed that if I add a backgroud to a TagView ( in order to get a line to the bottom of the View ) the widget doesn't display any Tags.

So the problem is : what's the problem with my XML?

`

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textStyle="bold"
            android:text="Interessi:"
            android:textSize="18sp"
            android:paddingRight="7dp"
            android:id="@+id/textView4" />
            <com.cunoraz.tagview.TagView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/modify_interests"
               />
    </LinearLayout>

`

Supporting drag and drop on tags

Hi,
I am just getting on board with the library. Would like to know if there is any way to drag and drop tags from one TagView to another. My use case is to create a tag filter using the tags from the tag view.
Thanks,
Prasanna

Row aligned center

All the rows of tags that are created are left aligned. There should be an option so that the tag rows are centered as they look superb.

Tag rows are center justify.

Colour of the tag not changing

I'm trying to change colour of the tag if the tag is clicked.
I'm doing this is onTagClickListener, code can be found below:

private OnTagClickListener onTagClickListener = new OnTagClickListener() {
@OverRide
public void onTagClick(Tag tag, int i) {
tag.tagTextColor = getContext().getColor(R.color.black);
}
};

Is it possible to change colour of the tag this way?
Also, I need to change colour of the tag depending on the present colour of the tag. Is it possible to do using this library?
Thanks.

Centred rows of tags

All the rows of tags that are created are left aligned. There should be an option so that the tag rows are centered as they look neat.

Methods count & gradle build settings

I would love to see the gradle settings to include this into your app in the README.md as well as the methods count as this plays a huge role in modern android development.

If you want me to I can create a pull-request.

Here are the Infos:

Gradle

repositories {
    maven {
        url "https://jitpack.io"
    }
}
dependencies {
    compile 'com.github.Cutta:TagView:c15dd8288a'
}

Taken from Android-Arsenal

Methods-Count

The badge indicating the methods-count.

Taken from methodscount.com

Issue when start activity with TagView's visibility is GONE

I use setVisibility(GONE) for TagView's parent view in Activity's onCreate method, and when I show the view again, tagview can not draw tags then. I had a look at tagview code, and found it maybe caused by
boolean variable mInitialized.

Can you please have a look at this? Thanks very much.

Sample Url is incorrect

The sample app dropbox url in the readme.md file is incorrect.
Is actually pointing to a demo app of GifView.

Delete item from inner collection in onDelete

After onDelete the item is still in inner collection, and it can break business logic.

                deletableView.setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        if (mDeleteListener != null) {
                            Tag targetTag = tag;
                            mDeleteListener.onTagDeleted(TagView.this, targetTag, position);
                        }
                    }
                });

Need delete from inner mTags!

First Tag text size greater than device width, Tag does not show.

If i add the first tag which is the header tag in your lib, and if its width is greater than device width, then the tags are not getting displayed in the view, or they are not getting added in the tag group.
And also after the header tag being larger than the screen, if i add other small letters tags then, they are also not getting added and displayed.

java.lang.NoClassDefFoundError: android.support.v7.widget.TintManager Error when using TagView

My dependecies are as follows, however, when using the TagView, I keep getting a java.lang.NoClassDefFoundError: android.support.v7.widget.TintManager. I am using a
compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile 'com.android.support:support-v4:23.1.1'
I am using a build version of "23.0.2" and I do have jitpack installed in the correct location as shown
allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } }

TagView.removeAll and remove(i) dosn't work

I have a bug.

first. i add 4 Tag in A Fragment. and then i start to B Fragment to update Tag . A fragment also need to update sync. and i Transfer a List to A fragment with EventBus.
in A Fragment , once i get Event , i call TagView.removeall(),then add new Tag. but the 4 previous Tag is still visible.
but my Log tell me, after removeAll , the TagView.getChildCount() is 0. so it should be removeall.

tagView.removeAll();
Logger.e(TAG,"tagView.getChildCount() = "+tagView.getChildCount());
Can you help me ?

Change in documentation required

In current readme.md, The xml tag for TagView is
<cuneyt.example.com.tagview.Tag.TagView

Which is not found in classpath, such giving exception.

Replacing above line with <com.cunoraz.tagview.TagView works and gives no exception. Please update documentation reflecting this change.

Problem with add two TagView in the same Layout

Hi,
There is a problem to add two different TagView in the same layout?
when i try to do this is i get a error..

Theme: themes:{default=overlay:com.cyngn.hexo, iconPack:com.cyngn.hexo, fontPkg:com.cyngn.hexo, com.android.systemui=overlay:com.cyngn.hexo, com.android.systemui.navbar=overlay:com.cyngn.hexo}
android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class android.support.design.internal.NavigationMenuItemView

The code i used is
<com.cunoraz.tagview.TagView android:id="@+id/tag_group" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="10dp" />

and when i duplicate this (and change the id name..) i get the error.

Thanks,
Meni.

If tag added in edittext has 90 width and other tag added has 40 width then both the tags are displayed in 40 width.

I debugged your library and found out that if i add a tag with 90 width in total and then after that tag has been added in the tag view, i am adding one more tag of 40 width. If on adding i will add the tags in ascending order width list like 10 width then 15 then 30 etc... so there will be no issues regarding this, but if that is not the case then the tags are not getting displayed fully. Please fix this immediately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.