Set Textview + Edittext + Button

后端 未结 4 1706
独厮守ぢ
独厮守ぢ 2021-01-23 07:50

I want to put in the same row a TextView, and Edittext and a button but I am having the problem that the button is not aligned properly to left and in small screens edittext fil

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-23 08:20

    Layout weigth is ideal for designing layouts that adjust to screen size. However, make sure to set layout_width to 0dp, or it won't work properly.

    Use like this:

        android:layout_width="0dp"
        android:layout_weight="1"
    

提交回复
热议问题