In the Android layout we sometimes need to place controls in the LinearLayout layout at the bottom of the layout, or if we want to align the bottom of several controls at the same time, we naturally think of using android:layout_gravity= "Bottom" put the control at the bottom of the linear layout, but this is not working, this problem today also bothered me for a long time, I thought it was the other place in the layout of the wrong or other places to make a mistake to appear this situation, finally no way to check the data to find the following rules:
When you linearlayout a layout:
When the total layout is horizontal layout when android:orientation= "Horizontal" , only the Top,bottom property in the vertical direction is working, and the horizontal direction of the property is not working;
Similarly, when the total layout is horizontal, that is, when the android:orientation= "vertical" is only top,bottom in the horizontal direction at this time The property is functional, and the vertical direction of the property is not functional.
Why doesn't android:layout_gravity= "bottom" work in Android layout?