I saw similar topics but solutions I saw there won't works for me.
So I have main ConstraintLayout with some editText. On the bottom of that Constraint I have FrameLayout with 2 buttons. Problem is that when we click on editText keyboard appears and cover my FrameLayout and I want to move that FrameLayout above that keyboard (if its shown)
FrameLayout code:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start"
android:text="Cancel" />
<com.google.android.material.button.MaterialButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="Continue" />
</FrameLayout>
I tried with android:windowSoftInputMode="adjustResize"
android:windowSoftInputMode="adjustPan"
but that doesn't work. The only thing that works somehow is adding android:fitsSystemWindows="true"
but that's also not great because adding this line changes height of my FrameLayout.
Finnaly I reached what I want using android:fitsSystemWindows="true"
The point is that if I add that to main layout it changed it heights and it has own background so I cannot use that. But I remove background of that FrameLayout add inside of it simple View
with proper height and add background on it and now it works.