Home:ALL Converter>textView below EditText not shown when keyboard is displayed

textView below EditText not shown when keyboard is displayed

Ask Time:2018-12-20T01:09:07         Author:Nik

Json Formatter

I have a constraint Layout which contains an EditText. There is a TextView below this EditText. When I select the EditText, a keyboard popup. Which is great. But the textView below the EditText is hidden under the Keyboard. How to show the TextView below me EditText. I have already tried android:windowSoftInputMode="adjustResize" and android:windowSoftInputMode="adjustPan"

But nothing is helping. The Textview is still hidden behind the keyboard.

here is my snapshot of my layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:ignore="MissingPrefix">

<include layout="@layout/toolbar" />
//other components

        <EditText
            android:id="@+id/registration_year"
            android:layout_width="80dp"
            android:layout_height="40dp"
            android:layout_marginTop="14dp"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"
            android:inputType="number"
            android:lineSpacingExtra="10sp"
            android:maxLength="4"
            android:gravity="center_vertical"
            android:maxLines="1"
            android:textSize="14sp"
            android:textColor="@color/black"
          android:background="@drawable/details_number_background_selector" />

        <TextView
            android:id="@+id/date_format_info"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:lineSpacingExtra="10sp"
            android:text="@string/details_year_format_text"
            android:textColor="#666666"
            android:textSize="14sp"/>
 </LinearLayout>

Author:Nik,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53856094/textview-below-edittext-not-shown-when-keyboard-is-displayed
yy