gpt4 book ai didi

java - 使用软键盘时 BottomAppBar 升高

转载 作者:行者123 更新时间:2023-11-29 18:32:30 25 4
gpt4 key购买 nike

我试图将 BottomAppBar 隐藏在键盘后面,但是当我将焦点转移到另一个 EditText 时,BottomAppBar 的部分开始出现,就像在photo .我也已经尝试更改 windowSoftInputMode 但我真的需要 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"/>

最佳答案

尝试将此添加到您的 <activity> list 中的标记

android:windowSoftInputMode="adjustPan|stateHidden"

关于java - 使用软键盘时 BottomAppBar 升高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55648339/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com