In xml file we can do;
android:layout_gravity="center_vertical|right"
I couldn’t find how to set those params programmatically. I think something like this is not possible.
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
params.gravity = Gravity.BOTTOM;
params.gravity = Gravity.CENTER;
1 Answer