У меня есть приложение для Android, которое состоит из основного макета FrameLayout, который имеет два представления, установленных в RelativeLayout. (см. макет XML-файлов ниже). Проблема связана с ориентацией экрана второго вида (view2) (вид становится черным, и приложение зависает).
Я безуспешно пытался использовать опцию android: Ориентация = "горизонтальная" в ресурсе layout-land.
Пожалуйста, порекомендуйте.
Спасибо. Oakist
main.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include android:id="@+id/notelist" layout="@layout/view1" />
<include android:id="@+id/notelist" layout="@layout/view2" />
</FrameLayout>
view1.xml
<RelativeLayout android:id="@+id/Layout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:id="@+id/image01"
android:layout_height="wrap_content"
>
</ImageView>
</RelativeLayout>
view2.xml
<RelativeLayout android:id="@+id/Layout02"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:id="@+id/image02"
android:layout_height="wrap_content"
>
</ImageView>
</RelativeLayout>