yakubishka
yakubishka

Reputation: 23

BottomAppBar raises while using soft keyboard

I'm trying to hide BottomAppBar behind keyboard but when I change focus to another EditText the part of BottomAppBar start to appear like in photo . Also I have already tried change windowSoftInputMode but I really need adjustPan.

    <com.google.android.material.bottomappbar.BottomAppBar
        android:id="@+id/bottom_appbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:layout_gravity="bottom"
        app:backgroundTint="@color/colorAccent"
        app:fabCradleMargin="@dimen/fab_margin"
        app:fabCradleRoundedCornerRadius="@dimen/fab_corner_radius"
        app:hideOnScroll="false"
        app:layout_scrollFlags="scroll|enterAlways"
        android:transitionName="bottom_appbar"
        style="@style/Widget.MaterialComponents.BottomAppBar" />

     <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/bottom_fab"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:clickable="true"
        app:tint="@color/colorPrimary"
        android:tint="@color/colorPrimary"
        app:backgroundTint="@color/floatButtonColor"
        app:rippleColor="@color/colorAccent"
        app:layout_anchor="@id/bottom_appbar"/>

Upvotes: 1

Views: 1080

Answers (1)

Archie G. Qui&#241;ones
Archie G. Qui&#241;ones

Reputation: 13648

try adding this to your <activity> tag in the manifest

android:windowSoftInputMode="adjustPan|stateHidden"

Upvotes: 3

Related Questions