Multiline TextView in Android?

前端 未结 20 1675
南方客
南方客 2020-11-29 17:26

I did like below in xml


    

        
20条回答
  •  -上瘾入骨i
    2020-11-29 18:00

    If the text you're putting in the TextView is short, it will not automatically expand to four lines. If you want the TextView to always have four lines regardless of the length of the text in it, set the android:lines attribute:

    
    

    You can do this with TableRow, see below code

    
            
    
            
        
    

提交回复
热议问题