0

I have a linear layout and on the bottom of it I have an EditText.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:paddingLeft="16dp"
   android:paddingRight="16dp"
   android:orientation="vertical"
   android:gravity="center">

<LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent">
    <TextView
        android:id="@+id/text_view_id"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:text="@string/hello" />
<TextView
        android:id="@+id/title"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:text="@string/hello" />
<TextView
        android:id="@+id/description"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:text="@string/hello" />
 </LinearLayout>

  <EditText
     android:id="@+id/plain_text_input"
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
     android:inputType="text"/>
 </LinearLayout>

The problem is that when I run the app and click on the edittext the keyboard pops up and trims whatever I am typing so the text being type is not visible during typing as soon as I exit the edittext it becomes visible does anyone have a suggestion on how to make sure that the edittext view is visible while we enter the data and does not get trimmed by keyboard?

kosep26860
  • 45
  • 4

2 Answers2

3

Try to add the below line in the manifest file in your particular Activity

android:windowSoftInputMode="adjustPan" 

as explained here

Masoud Badrmiran
  • 421
  • 2
  • 4
  • 11
0

Go to your AndroidManifest.xml file and in the specific activity use

`android:windowSoftInputMode="adjustResize"` 

It should resolve your problem.

Suvajit Patra
  • 190
  • 1
  • 4