【发布时间】:2015-03-31 01:58:19
【问题描述】:
我正在尝试使用相对布局来环绕按钮。它看起来像这样:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Theme.MyCompany.Button.Container"
android:layout_weight="10">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center"
style="@style/Theme.MyCompany.Button.MyList"
android:id="@+id/this is my button"
android:text="@string/this_is_my_button"/>
</RelativeLayout>
它在宽度方面包裹得很好,但高度达到了上面的 LinearLayout。
我试图通过创建一个白色的按钮主题来破解它,但它只是创建了一个更轻的视图。
如何让这个按钮出现在页面底部,无论是否使用容器?
【问题讨论】:
-
这个传说中的“LinearLayout”在哪里?
标签: android android-layout button android-relativelayout