Androidレイアウトの4つの可能な画面コーナー(解像度に関係なく)に4つの画像ボタンを配置しようとしています。画像の背景を静的(つまり、50x50のディップ)にし、android.gesture.GestureOverlayViewレイヤーを全画面の背景に配置したいと思います。私はこれを理解するのに苦労していて、Droiddevで非常に新しいです。Eclipse +AVD2.1.1での作業
どうもありがとう!!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#6495ED"
android:gravity="fill"
android:launchMode="singleInstance"
android:orientation="vertical" >
<!-- ICON -->
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TableLayout
android:id="@+id/tableLayout2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:stretchColumns="*">
<TableRow
android:id="@+id/tableRow5"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<!-- SETTINGS -->
<Button
android:id="@+id/button1"
android:layout_width="50dip"
android:layout_height="50dip"
android:layout_gravity="left"
android:layout_weight="1"
android:background="@drawable/options"
android:clickable="true"
android:minHeight="50dp"
android:minWidth="50dp"
android:visibility="visible" />
<!-- LIST -->
<Button
android:id="@+id/button4"
android:layout_width="0dip"
android:layout_height="50dip"
android:layout_gravity="right"
android:layout_weight="1"
android:background="@drawable/list"
android:clickable="true"
android:maxHeight="50dp"
android:maxWidth="50dp"
android:visibility="visible" />
</TableRow>
<!-- GESTURE (GOES FULL SCREEN ON BACKGROUND -->
<android.gesture.GestureOverlayView
android:id="@+id/gestureOverlayView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</android.gesture.GestureOverlayView>
<TableRow>
<!-- SEARCH -->
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:background="@drawable/find"
android:clickable="true"
android:maxHeight="50dp"
android:maxWidth="50dp"
android:visibility="visible" />
<!-- CLOSE -->
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="@drawable/close"
android:gravity="right|top"
android:clickable="true"
android:Height="50dp"
android:Width="50dp"
android:visibility="visible" />
</TableRow>
</TableLayout>
</LinearLayout>