2010-06-14 30 views
3

我在底部设置了我的tabWidget。当我想编辑编辑文本时,键盘会升起。但标签小部件来自键盘上方。为了支持多屏幕,我设置了android:layout_weight =“1.0”。之后,我遇到了这个问题,我在下面添加了我的布局代码。任何想法使TabWidget在底部稳定?TabWidget在Android的底部不稳定?为什么?

代码:

<?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> 

+0

[看这里](http://stackoverflow.com/a/6992662/593709)如果你想iPhone像标签主机。 – 2012-03-21 11:11:05

回答

4

您可能需要调整您的清单中windowSoftInputMode。这将控制显示软键盘时屏幕的移动方式。也许你想adjustPan而不是默认adjustResize?这page有各种输入模式的更多信息。

相关问题