Multiline TextView with width “wrap_content”

后端 未结 4 2248
南方客
南方客 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:31

    You could try

    android:inputType="textMultiLine"
    

    in your TextView XML. This worked for me.

提交回复
热议问题