There is a layout with parameters

FrameLayout.LayoutParams controlLayoutParam = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM); 

draws 3 pictures, I add another 1 picture, and it is drawn on the bottom left, but I want it to be higher than the buttons, and be above them.

The image is added to the layout with the following parameters:

RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(337, 200);

All work is done in code, without xml.

  • But can you give an example of how you need it, for example a picture :) - andreich

1 answer 1

Try after

 RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(337, 200); 

to write

 params.addRule(RelativeLayout.ALIGN_PARENT_TOP);