Multiline TextView with width “wrap_content”

后端 未结 4 2261
南方客
南方客 2021-02-18 21:58

I am wondering how to have a TextView display its content on several lines without hardcoding the width in the XML.

    

        
4条回答
  •  一个人的身影
    2021-02-18 22:35

    Though I cannot reproduce the not wrapping problem, you can fix the positioning problem by using a weight on the first TextView. Using the following XML gives the expected output in the graphical layout view in Eclipse:

    
    
        
    
        
    
    
    

提交回复
热议问题