How do I prevent an EditText from resizing itself when the user is typing?

前端 未结 10 1979
粉色の甜心
粉色の甜心 2021-01-30 16:18

I have an EditText and a Button set next to each other on the same horizontal line. It looks great, except when the user enters a lot of text, the

10条回答
  •  情歌与酒
    2021-01-30 16:53

    For EditText use

    android:layout_width="0dp" - not required but preferred.
    android:layout_weight="1"
    

    And for Button dont specify android:layout_weight

提交回复
热议问题