Multiline TextView in Android?

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

I did like below in xml


    

        
20条回答
  •  醉梦人生
    2020-11-29 18:10

    TextView is used to display text on Android application. By default, TextView displays text on one line and if long, TextView will automatically display with more lines to display its text in the most logical way.

    Android developers can create a new line on TextView both in programming and syntax. Android developers can create multi-line TextView without dividing text into multiple lines according to android: minLines properties. Create layout.xml

    
    
    
    
        
    
    
    
        
    
    
    
        
    
    
    
        
    
    
    

    Add string in file string.xml

    
    
            Line number 1 \nLine number 2
    
        
    

    Source: https://code-android-example.blogspot.com/2020/11/android-textview-multiline-example.html

提交回复
热议问题