0

My requirement is like need to show list of names in horizontal view. If the names exceeds the screen width, it display them in the second line. For that i created linear layout and programmatically adding textview in layout but if it exceeds screen width it not showing in second line.

Can anyone help me or suggest to achieve this?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Kamal
  • 1,051
  • 1
  • 11
  • 24
  • 1
    You can use a single `TextView` and add the multi-line support there. Look into the accepted answer [here](https://stackoverflow.com/questions/6674578/multiline-textview-in-android). – Reaz Murshed Jun 22 '19 at 08:10
  • Hi @ReazMurshed, thanks for your quick answer but the thing is like each name has some background color which indicates some status. If i'm using single textview is that possible to achieve too – Kamal Jun 22 '19 at 08:14
  • I think you are trying to implement `Chip`. Please see the following link - https://medium.com/material-design-in-action/chips-material-components-for-android-46001664a40f – Reaz Murshed Jun 22 '19 at 08:24
  • https://stackoverflow.com/questions/6674578/multiline-textview-in-android – Yyy Jul 02 '19 at 08:20

0 Answers0