I created a layout
and in it I put the following code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:orientation="vertical"
android:screenOrientation="portrait"
>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="Teste de Orientação"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
BUT when I squeeze it in the emulator, and I press the 9 button on the keyboard (to change orientation) it returns to another layout
, the login (main).
What should I do to not give this type of error?