gpt4 book ai didi

Android float 操作按钮出现

转载 作者:行者123 更新时间:2023-11-29 14:21:37 28 4
gpt4 key购买 nike

在我的 Activity 中,当我在操作栏中按下搜索时,软键盘会出现,这是预期的,但问题是我在底部有一个 float 操作按钮,它也会出现,如下所示。这个怎么解决。 enter image description here

<FrameLayout  xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true" >

<ListView android:id="@android:id/list"
style="?android:attr/listViewWhiteStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>


<ImageButton
android:id="@+id/floating_action_button"
android:layout_width="@dimen/floating_action_button_width"
android:layout_height="@dimen/floating_action_button_height"
android:layout_marginBottom="@dimen/floating_action_button_margin_bottom"
android:layout_gravity="bottom|center_horizontal"
android:background="@drawable/floating_action_button"
android:src="@drawable/ic_messaging_new_message"
/>

</FrameLayout>

最佳答案

尝试在 list 的 Activity 标签中提供 android:windowSoftInputMode="stateAlwaysHidden|adjustNothing"android:windowSoftInputMode="stateAlwaysHidden|adjustPan"

关于Android float 操作按钮出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29774323/

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