0

I'm trying to make the keyboard appear only below the EditText, using AdjustPan, I'm getting this :

I tried to hide the suggestions part of the keyboard, but it didn't help, a part of the EditText is still hidden under the keyboard.

I'm using the code below :

<style name="DialogStyle" parent="Theme.Design.Light.BottomSheetDialog">
    <item name="android:windowIsFloating">false</item>
    <item name="android:windowSoftInputMode">adjustPan</item>
</style>

EditText :

<EditText
        android:id="@+id/edit_query"
        android:layout_width="match_parent"
        android:layout_height="40dp"
        android:layout_margin="8dp"
        android:background="@drawable/edit_bg"
        android:hint="@string/enter_your_text"
        android:imeOptions="actionDone"
        android:inputType="text|textNoSuggestions"
        android:maxLength="250"
        android:maxLines="1"
        android:paddingStart="8dp"
        android:paddingEnd="8dp"
        android:singleLine="true"
        android:textColor="@color/black"
        android:textSize="12sp"
        android:textStyle="normal" />

I just want the keyboard to be exactly below the EditText.

Thank you.

1 Answers1

0

Try this

<item name="android:windowSoftInputMode">adjustResize</item>

and when you want to create your dialog

    setStyle(DialogFragment.STYLE_NORMAL, R.style.DialogStyle)
Sadegh.t
  • 205
  • 3
  • 10