0

ギャラリーや写真を撮るなどの選択画面を作成しています。縦向きのレイアウトは問題ありませんが、横向きに苦労しています。DroidDraw を使用しようとしています。これは私がサンプルとして目指している種類の外観です (ボタンは無視してください) が、レイアウトは非推奨です。

    <?xml version="1.0" encoding="utf-8"?>
     <AbsoluteLayout
  android:id="@+id/widget65"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <Button
android:id="@+id/widget66"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CAMERA"
android:layout_x="136dp"
android:layout_y="96dp" />
    <Button
android:id="@+id/widget67"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GALLERY"
android:layout_x="272dp"
android:layout_y="95dp" />
    <TextView
android:id="@+id/widget68"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Choose from Gallery"
android:layout_x="246dp"
android:layout_y="146dp" />
    <TextView
android:id="@+id/widget69"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Take Picture"
android:layout_x="117dp"
android:layout_y="149dp" />
    </AbsoluteLayout>
4

1 に答える 1

0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/widget65"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginTop="100dp" >

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:orientation="vertical" >

            <Button
                android:id="@+id/widget66"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_gravity="center"
                android:text="CAMERA" />

            <TextView
                android:id="@+id/widget68"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_gravity="center"
                android:text="Choose from Gallery" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:orientation="vertical" >

            <Button
                android:id="@+id/widget67"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_gravity="center"
                android:text="GALLERY" />

            <TextView
                android:id="@+id/widget69"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:text="Take Picture" />
        </LinearLayout>
    </LinearLayout>
</LinearLayout>
于 2012-09-29T08:49:24.177 に答える