Android的UI布局,上中下的自适应屏幕布局

39 views
Skip to first unread message

JerryLi

unread,
Feb 12, 2012, 10:13:09 PM2/12/12
to Jerry.Li Blog
<?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">

<LinearLayout
android:id="@+id/top"
android:background="#ff303030"
android:layout_width="fill_parent"
android:layout_height="50dp">
</LinearLayout>

<LinearLayout
android:id="@+id/bottom"
android:background="#ff303030"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true">
</LinearLayout>
<ScrollView
android:id="@+id/center"
android:background="#ffa0a0a0"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/top"
android:layout_above="@+id/bottom"
></ScrollView>
</RelativeLayout>
Reply all
Reply to author
Forward
0 new messages