Reputation: 170
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.
Upvotes: 0
Views: 135
Reputation: 1800
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.
Upvotes: 2