When I hit enter key many times my top layout is moving up, how to solve this?
The only way I know is adding attribute in the manifest.xml, but doing this will make I can't see the cursor when at the bottom screen.
like below:
<activity
...
android:windowSoftInputMode="adjustNothing" />
my_layout.xml
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="58dp"
android:paddingBottom="4dp"
>
<RelativeLayout
android:id="@+id/toolsLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
...
</RelativeLayout>
</com.google.android.material.appbar.AppBarLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="8dp"
android:layout_marginVertical="8dp"
>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="12dp"
android:paddingVertical="8dp"
android:gravity="top"
android:lineSpacingExtra="4dp"
android:textSize="16sp"
android:textColor="#6F5CB3"
/>
</RelativeLayout>
</LinearLayout>