0

Android 3.1 タブレット アプリケーションを開発しています。

このアプリケーションでは、横向きの画面に 2 つのギャラリーを配置し、これら 2 つのギャラリーの幅を 50% にします。

これは私のレイアウトです:

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

[ ... ]

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="200dip"
        android:weightSum="1"
        android:orientation="vertical"> 

        <Gallery
            android:id="@+id/factGallery"
            android:layout_weight=".5"
            android:layout_width="0dip"
            android:layout_height="fill_parent"/>

        <Gallery
            android:id="@+id/wareHouseGallery"
            android:layout_weight=".5"
            android:layout_width="0dip"
            android:layout_height="fill_parent"/>

    </LinearLayout>

[ ... ]
</LinearLayout>

しかし、それはよく見えません。

どうすればいいですか?

4

1 に答える 1

1

私はあなたがそれらを水平に並べたいと仮定しています。その場合、LinearLayoutの向きが間違っています - 水平に設定する必要があります:

android:orientation="horizontal"
于 2012-09-19T10:40:18.337 に答える