gpt4 book ai didi

android - TabWidget 在 Android 底部不稳定?为什么?

转载 作者:太空宇宙 更新时间:2023-11-03 13:38:52 25 4
gpt4 key购买 nike

我将 tabWidget 设置在底部。当我想编辑编辑文本时,键盘会升起。但是选项卡小部件位于键盘上方。为了支持多屏幕,我设置了 android:layout_weight="1.0"。之后,我遇到了这个问题,我在下面添加了我的布局代码。有什么想法可以使底部的 TabWidget 稳定吗?

代码:

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabcontent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_weight="1.0">

</FrameLayout>
<TabWidget android:id="@android:id/tabs"
android:layout_gravity="bottom" android:background="@drawable/gradient_black"
android:listSelector="@color/transparent" android:layout_width="fill_parent"
android:layout_height="63dip" />
</LinearLayout>

最佳答案

您可能需要调整 windowSoftInputMode在你的 list 中。这控制在显示软键盘时屏幕如何移动。也许您想使用 AdjustPan 而不是默认的 adjustResize?这page有关于各种输入模式的更多信息。

关于android - TabWidget 在 Android 底部不稳定?为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3039674/

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