0

I have a basic form with some Textviews on the left and Edittexts on the right.

When I try to type in portrait mode everything looks fine.

Portrait View

However, when trying to type in landscape mode, I can't see the Textview beside the Edittext.

Landscape View

Here is my xml code

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">

    <TextView
    android:text="Name:"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="22dp"
    android:layout_marginTop="20dp"
    android:id="@+id/textView_name"
    android:layout_below="@+id/editText_pass"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true" />

        <EditText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:inputType="textPersonName"
            android:textSize="22dp"
            android:ems="10"
            android:layout_marginTop="10dp"
            android:layout_alignTop="@+id/textView_name"
            android:layout_alignLeft="@+id/editText_pass"
            android:layout_alignStart="@+id/editText_pass"
            android:id="@+id/editText_name" />

    </LinearLayout>
    </LinearLayout>
</ScrollView>

Edit: The question is indeed a duplicate of Disabling the fullscreen editing view for soft keyboard input in landscape?

The title could also be considered a bit vague.

However, both answers given produced the desired result (though with limitations to the view), so I leave up to a moderator to decide if the question is worth deleting or not.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Xenofonos
  • 119
  • 1
  • 2
  • 14
  • 3
    Possible duplicate of [Disabling the fullscreen editing view for soft keyboard input in landscape?](https://stackoverflow.com/questions/4336762/disabling-the-fullscreen-editing-view-for-soft-keyboard-input-in-landscape) – patrick.elmquist Nov 17 '17 at 12:09
  • Both the images and your content doesn't match. Please check the question again. – Nigam Patro Nov 17 '17 at 12:09
  • By the way this is the normal behavior of android application in landscape mode. Every textfield will take the whole screen. – Umair Nov 17 '17 at 12:11

1 Answers1

0

In your xml where you are creating your textView add this line:

android:imeOptions="flagNoFullscreen"
Muhammad Saad Rafique
  • 3,158
  • 1
  • 13
  • 21
  • yes buddy for that you have to adjust your views that is only why android used this technique.If you use whatsapp in landscape then you will find that behavior. And if it works mark this post as answer mate. Happy Coding :) – Muhammad Saad Rafique Nov 17 '17 at 12:27