kaedea / android-tagview

An Android TagView Widget. You can edit the tag's style, and set listener of selecting or deleting tag.
663 stars 134 forks source link

Fix bug: TagView with deletableView #8

Closed KANGOD closed 8 years ago

KANGOD commented 9 years ago

TagView with deletableView will make a new line too early, since tagWidth is calculated in mistake. In line 228, there should be + offset + (textPaddingRight + offset) instead of + textPaddingLeft + textPaddingRight. Dynamically get PaddingLeft and PaddingRight of deletableView, so you can change it's padding in future without modify this code snippet.

kaedea commented 9 years ago

Thanks for pr, I will handle this issue in next version. :)

KANGOD commented 9 years ago

Yeah, also check this: https://github.com/KANGOD/Android-Cloud-TagView-Plus/commit/fb906c36564bf9df1b1a95520adedf494e0b55bc line 240 of TagView.java I came up with a tag Te... instead of Test2 at end-of-line. With only 5px's mistake. Sigh poisonous boundary condition.

kaedea commented 9 years ago

Actually, the calculation need some improvement. Thank you for the details.

kaedea commented 9 years ago

I think I have to create a dev branch so that any improving code can be added easily/