私のアプリでは、ボタンはリストビューのようにスクロールビューに配置されています。それは、ポートレートモードでは、アプリが良いときに見える。私がランドスケープモードに設定すると、最初のボタンは表示されません。前もって感謝します。スクロールビューのボタンが表示されません。アンドロイドで横長モードのときに最初のボタン
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/mm"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_vertical|center_horizontal"
android:layout_gravity="center_vertical|center_horizontal"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:gravity="center_vertical|center_horizontal"
android:layout_gravity="center_vertical|center_horizontal"
>
<Button
android:id="@+id/btn_milk_production"
android:layout_width="fill_parent"
android:layout_height="@dimen/button_layout_height"
android:text="Milk Production"
android:layout_margin="10dp"
android:textSize="@dimen/button_txt_size"
android:background="@drawable/btn"
android:textColor="#1a1a1a"
/>
<Button
android:id="@+id/btn_milk_dispatch"
android:layout_width="fill_parent"
android:layout_height="@dimen/button_layout_height"
android:text="Product Sales"
android:layout_margin="10dp"
android:textSize="@dimen/button_txt_size"
android:background="@drawable/btn"
android:textColor="#1a1a1a"
/>
<Button
android:id="@+id/btn_sale_order"
android:layout_width="fill_parent"
android:layout_height="@dimen/button_layout_height"
android:text="sale order"
android:layout_margin="10dp"
android:textSize="@dimen/button_txt_size"
android:background="@drawable/btn"
android:textColor="#1a1a1a"
/>
<Button
android:id="@+id/btn_customer_creation"
android:layout_width="fill_parent"
android:layout_height="@dimen/button_layout_height"
android:text="create customer"
android:layout_margin="10dp"
android:textSize="@dimen/button_txt_size"
android:background="@drawable/btn"
android:textColor="#1a1a1a"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
あなたはまだ "fill_parent" を使用する理由? –
"match_parent"を使用しました。出力されませんでした。 –
「android:layout_gravity」の最初の「linear_layout」 –