Vote count:
0
Let's say I have a button and an EditText, aligned at the same height(the bottom of the screen) and sharing the width of the screen. I want the button to take just the space it needs, and the editText to cover the rest of the width.
Up until now I've been using a linearLayout, where in this case I could put those two elements inside an horizontal linear layout, set the weight of the editText to 1 and the with of the button to wrap_content, and it would work.
However, I am not able to replicate this behaviour using a relative layout. I can put the editText at the bottom of the parent, and then set the button to its right, but I don't know how to make the editText fill the rest of the width respecting the button's space.
What's the correct way to do it?
divide the width of elements in relative layout?
Aucun commentaire:
Enregistrer un commentaire