0

I have tried to make my Android app work in landscape mode but I have failed thus far. Below is the xml code for the layout , and I want to know how to use the ScrollView in landscape mode.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:android1="http://schemas.android.com/apk/res/android"
        android1:id="@+id/LinearLayout1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#FFDEAD"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        android1:gravity="center|left|right"
        android1:orientation="vertical"
        tools:context=".MainActivity" >

        <TextView
            android:id="@+id/textView1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Number1" ></TextView>

        <EditText
            android:id="@+id/N1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Enter number 1"
            android:inputType="numberSigned" >

            <requestFocus />
        </EditText>

</LinearLayout>
Al Lelopath
  • 6,448
  • 13
  • 82
  • 139
Mohammed Alawneh
  • 306
  • 9
  • 22

1 Answers1

1

Do you have something like this around your LinearLayout?

<ScrollView  xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">

    <LinearLayout>
        ...
    </LinearLayout> 

</ScrollView>
Al Lelopath
  • 6,448
  • 13
  • 82
  • 139