设置我tabWidget在底部。当我想编辑的EditText键盘将抬起。但该选项卡WIDGET来在键盘上方。到所述多个屏支持我设置机器人: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 在您的清单。该控件显示软键盘时,屏幕是如何移动。也许你想AdjustPan而不是默认的adjustResize?这页面对各种输入模式的详细信息。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top