I am playing around with Mono Droid and trying to implement the following layout
What type of layout would I use? Is there anything in Android like anchors and docking, like WinForms, so that this is can be somewhat independent?
This is for tablets only, and is more for my experimentation. The buttons inside of the left panel are to be repeating.
Thanks.
The root Layout will be like This:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:padding="5dp" >
<RelativeLayout
android:id="@+id/leftContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.8" >
</RelativeLayout>
<RelativeLayout
android:id="@+id/rightContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:padding="20dp" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="btn1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="btn2" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="btn3" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
add you dymanic items as ListView on the top off Right and Left Layouts.
线性布局将正常工作..您可以指定要捕获的空间的权重。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.