0

enter image description here

I want to create UI like shown in picture. TextView with close button should be added dynamically. Total view width is fixed. Added view(TextView + close button) should adjust it self according to parent width. How could it be possible. Any help would be appreciated. Thanks in advance.

3

1 Answer 1

2

Look at my answer here Adding TextView in LinearLayout like chips same as Gmail address suggestion It solve your problem based on TextView and SpannableString, like it work in Gmail and Google Hangouts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.