I have a relative layout. For simplicity, there is an ImageView, EditText, and Button:
- The
ImageViewis a banner with a fixed height - Below that is and the
EditTextwhereandroid:layout_width="fill_parent" - Below that is a
Buttonwith a fixed width and height
The problem is I want the editText to fill the leftover height of the screen. put and image on the top, a button on the bottom, and in the middle and edit text that takes up the rest of the space.
What property would i have to work with to get something similar to this?
For this purpose, there is
LinearLayoutwithlayout_weightproperty. UseLinearLayoutfor holding these 3 elements. ForButtonandImageView, setlayout_heightaswrap_content. ForEditTextsetlayout_height="0dp"andlayout_weight="1".