0
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 run it in the emulator, and press the button 9 on the keyboard (to change orientation) back to another layout
, the login (main).
What should I do to not make that kind of mistake?
It is not quite clear what you are asking. Please further develop your question.
– ramaral
I created a layout and put that code where it shows the function to leave only in PORTRAIT mode but when I run the app in the emulator, and test it in LANDSCAPE mode (by pressing the button 6 or 9)to see if it continues in PORTRAIT mode, but the error in which to return to my main layout, which has nothing to do =(
– jhonjhon
Please post the code of
Activity
where thelayout
is used. If you are giving any error post also the Logcat. The information you gave is not enough to see where the problem is.– ramaral