Set Layout Gravity Programmatically or rather align view at bottom of parent FrameLayout - Source: ((FrameLayout.LayoutParams) view.getLayoutParams()).gravity = Gravity.BOTTOM;
((FrameLayout.LayoutParams) view.getLayoutParams()).gravity = Gravity.BOTTOM;
// or on FrameLayout.LayoutParams creation
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(width != 0 ? width : FrameLayout.LayoutParams.MATCH_PARENT, height, Gravity.BOTTOM);