Android TextView Text not getting wrapped

前端 未结 24 1714
时光说笑
时光说笑 2020-11-27 02:51

Can anyone tell me what\'s going wrong with the text? Text longer than one line doesn\'t wrap to the next line but goes beyond the screen.

Following is the code:

24条回答
  •  猫巷女王i
    2020-11-27 03:22

    One of your layout parameters is wrong in your code. In the first TextView

    android:layout_width="wrap_content"
    

    change to

    android:layout_width="fill_parent" 
    

    The text that out of screen width size will wrap to next line and set android:singleline="false".

提交回复
热议问题