Set Textview + Edittext + Button

后端 未结 4 1703
独厮守ぢ
独厮守ぢ 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:13

    Apply a weight to your EditText so it will take up as much room as it can while letting the other two elements do the normal wrap_content. To do this, remove the relative layout container and then change the EditText width to "0dp" and give it a layout_weight of "1" as follows:

    
    
        
    
        
    
        

提交回复
热议问题