I don't have any sample code for this case, because I don't know how this work.
A screenshot will explain this much clearer.
I'm trying to create an input like a Telegram.
Once the sticker button is clicked, hide the keyboard and show a panel with the same height.
The current way that I'm doing will cause the window jumping around. Because when the panel is open, the input will be pushed up When the keyboard is hidden, the input will go to the bottom then pushed up after the sticker panel shows up.
This is what I have right now
<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:id="@+id/inputLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:showIn="@layout/activity_main">
<LinearLayout
android:id="@+id/inputContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/inputBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/galleryContainer"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/send_panel_color"
>
</RelativeLayout>