Android layout Android横向视图在模拟器中不工作

Android layout Android横向视图在模拟器中不工作,android-layout,landscape,Android Layout,Landscape,“我的视图”使用默认的纵向视图。当我在Eclipse模拟器中使用CTRL+F12时,它不会旋转 我正在使用Nexus_API_17 我在layout land下创建了布局视图 下面是layoutland-activity-quick.xml的代码。我做错了什么: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.co

“我的视图”使用默认的纵向视图。当我在Eclipse模拟器中使用CTRL+F12时,它不会旋转

我正在使用Nexus_API_17

我在layout land下创建了布局视图

下面是layoutland-activity-quick.xml的代码。我做错了什么:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    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>

感谢Frank N.Stein通过评论提出正确的方法:

对于有此问题的任何人,以下是我如何设置旧Froyo AVD来测试此场景:

  • 我的清单最小版本已经是8,这是Froyo

    <使用sdk android:minSdkVersion=“8” android:targetSdkVersion=“21”/>

  • 您可以在此处查看SDK\u API\u版本信息。

  • 在SDK管理器中,安装了所需的版本:

  • 为新版本创建了新的AVD

  • 据我所知,在两个方向上都能正常工作的唯一模拟器是API Level 2.2。我对所有较新的软件总是有问题(但可能是因为我使用的是
    eclipseadt包
    ?)。谢谢Frank。所以唯一的方法是用物理设备进行测试?不是。另一种方法是让你的应用程序与次要版本兼容(使用8)。但是您可能需要进行很多修改,例如添加支持库和使用支持方法。。。也许,最好的方法(不要让你晕倒)是用物理设备对你的应用进行USB调试。再次感谢弗兰克。我会选择USB调试方法。哦。弗罗约甚至不在我的脑海里。也许我会走更艰难的路,把事情做好。再次感谢您抽出时间。