I have a layout and I'm trying to have a view fill all the remaining space, EXCEPT some 50dp width image at the end. When I set the first view's width to match_parent
, it occupies the whole view, and whatever I set to the image's width, it's placed outside the screen bounds. Here is what's happening:
But I want it like this: (achieved by setting the first view's width to a constant just to demo, which I definitely don't want as it should fill a dynamic amount of width)
Here is my current layout:
The problem is at the LinearLayout (vertical)
which is just below the avatar view in the hierarchy. It occupies the correct space, but it's children are not acting the way I want.
How can I achieve the desired layout?