Created
November 18, 2016 14:38
-
-
Save kbshl/f6a780ef2ff18042acaf1c93f9fa20c9 to your computer and use it in GitHub Desktop.
Set Layout Gravity Programmatically or rather align view at bottom of parent FrameLayout - Source: ((FrameLayout.LayoutParams) view.getLayoutParams()).gravity = Gravity.BOTTOM;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment