Android Landscape view does not work in the simulator

  • Replies:1
Rain Maker
  • Forum posts: 1

Sep 18, 2014, 7:19:30 PM via Website

My view comes up with the default portrait view. When I use CTRL+F12 in the Eclipse simulator it does not rotate.

I am using Nexus_API_17.

I created the layout view under layout-land.

Here is the code for layout-land - activity-quiz.xml. What am I doing wrong:

<FrameLayout 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <TextView
        android:id="@+id/question_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:padding = "24dp"/>



    <LinearLayout 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_gravity="center_vertical|center_horizontal">

        <Button
        android:id="@+id/true_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/true_button" />

        <Button
        android:id="@+id/false_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/false_button" />

    </LinearLayout>    

   <LinearLayout 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_gravity="center_vertical|center_horizontal">
    <ImageButton
        android:contentDescription="@string/MyImage1"
        android:id="@+id/prev_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/arrow_left"
        android:layout_gravity="bottom|left"
        />
    <ImageButton
        android:contentDescription="@string/MyImage2"
        android:id="@+id/next_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/arrow_right"
        android:layout_gravity="bottom|right"
        />


    </LinearLayout>

</FrameLayout>

Reply
Ashish Tripathi
  • Forum posts: 211

Sep 19, 2014, 9:07:58 AM via Website

use 7 numeric key and check

Reply