请在主布局下选择一个相对布局.将其高度和宽度设置为填充父级,并将其重力设置为底部,并将任何textview或任何按钮放入其中.
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom">
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Bottom Gravity" />
android:layout_width="fill_parent"
android:layout_height="wrap_content">
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Without Gravity" />