I created a layout in my application that includes the followings:
main_layout (FrameLayout, fills whole screen)
-> includes: main_interface (LinearLayout, height/width fills parent)
Now I want to add another LinearLayout in the main_layout BEFORE the main_interface. I tried this:
LinearLayout bar = new LinearLayout(this); bar.setGravity(Gravity.TOP); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); bar.setLayoutParams(params); main_layout.addView(bar); but this just overlaps my main_interface.
Any Help?