进出口试图对准两个按钮(“重置”和“应用”)在底部,但它总是将自己屏幕无法将按钮定位到屏幕底部
`
顶部<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/form_bg">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:id="@+id/strp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp">
<com.widget.AppButton
android:id="@+id/country_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_config"
android:gravity="left"
android:padding="10dp"
android:text="Country"
android:textColor="#000"
android:textSize="32sp"
android:textStyle="italic" />
<com.widget.AppButton
android:id="@+id/domain_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_config"
android:gravity="left"
android:padding="10dip"
android:text="Domain"
android:textColor="#000"
android:textSize="32sp"
android:textStyle="italic" />
<com.widget.AppButton
android:id="@+id/unit_filter"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@drawable/button_config"
android:gravity="left"
android:padding="10dp"
android:text="Unit"
android:textColor="#000"
android:textSize="32sp"
android:textStyle="italic" />
</LinearLayout>
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="@drawable/white_divider" />
<View
android:layout_width="1px"
android:layout_height="match_parent"
android:background="@drawable/black_divider" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/strp"
android:layout_alignParentBottom="true">
<com.widget.AppButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reset"
android:textStyle="bold"
android:id="@+id/button"
style="@style/btn"
android:layout_weight="1"/>
<com.widget.AppButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Apply"
android:textStyle="bold"
android:id="@+id/button2"
style="@style/btn"
android:layout_weight="1"/>
</LinearLayout>
</RelativeLayout>`
我的课程设置layout_alignParentBottom为真,但仍问题仍然存在
删除'android:layout_alignBottom =“@ + id/strp”'并将高度设置为'wrap_content'。 –
尝试删除android:layout_alignBottom =“@ + id/strp”' – Mohit
请使用LinearLayout来代替 –