Vicky
Vicky

Reputation: 170

Design dynamic UI like in given Image

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.

Upvotes: 0

Views: 135

Answers (1)

Alexander Mikhaylov
Alexander Mikhaylov

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

Related Questions