SAN*_*HYA 2 android relativelayout android-layout android-linearlayout
我需要在relativelayout的底部放置一个线性布局,这是xml中最顶层的父布局.我怎样才能做到这一点?
请帮我.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
android:orientation="vertical" >
<RelativeLayout ....... <<--- this should occupy total available space
</Relativelayout
<Linearlayout ....... <<-- this should place at bottom always with height 50dp
</LineaLayout>
</ReltiveLayout>
Run Code Online (Sandbox Code Playgroud)
Sha*_*wal 17
请试试这个:
<LinearLayout android:layout_alignParentBottom="true" android:layout_height="50dp" android:layout_width="wrap_content">
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
你可以在xml的底部与上面的属性对齐.
| 归档时间: |
|
| 查看次数: |
10483 次 |
| 最近记录: |