私はMono Droidで遊んでいて、次のレイアウトを実装しようとしています
どのタイプのレイアウトを使用しますか? Android には、WinForms のようなアンカーやドッキングのようなものがあるので、ある程度独立させることができますか?
これはタブレット専用で、私の実験用です。左パネル内のボタンは繰り返します。
ありがとう。
私はMono Droidで遊んでいて、次のレイアウトを実装しようとしています
どのタイプのレイアウトを使用しますか? Android には、WinForms のようなアンカーやドッキングのようなものがあるので、ある程度独立させることができますか?
これはタブレット専用で、私の実験用です。左パネル内のボタンは繰り返します。
ありがとう。
ルート レイアウトは次のようになります。
<?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>
Right and Left Layoutsの上部にListViewとして動的アイテムを追加します。
線形レイアウトは適切に機能します..キャプチャするスペースを指定するための重みを与えることができます..