Я пытаюсь поместить в свой макет семь кнопок на маленьком экране, чтобы протестировать его (Galaxy young), поэтому я использовал прокрутку, но у меня все еще есть проблемы ( >экран не прокручивается в режиме LandScape).
это мой xml-код:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:fillViewport="true">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<Button
android:id="@+id/lieu_depart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Lieu de prise en charge"
style="" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentLeft="false"
android:layout_alignParentRight="false"
android:layout_below="@+id/linearLayout1"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/activity_vertical_margin" >
<Button
android:id="@+id/button2_date_depart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:text="Date1" />
<Button
android:id="@+id/time_depart5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:text="Time1" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@+id/linearLayout2"
android:layout_centerHorizontal="true"
android:orientation="horizontal" >
<Button
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="@dimen/activity_vertical_margin"
android:text="Lieu de restitution" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/linearLayout3"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:orientation="horizontal" >
<Button
android:id="@+id/button5_date_arrive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:text="Date2" />
<Button
android:id="@+id/button6_time_arrive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="70dp"
android:text="Time2" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/linearLayout4"
android:orientation="horizontal" >
<Button
android:id="@+id/Button03"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Button" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
РЕДАКТИРОВАНИЕ: Портретный режим:
Пейзажный режим:
что я должен использовать, чтобы ограничить эту проблему?
Спасибо