在我的应用程序中有标签栏和编辑框。
请参见下面的图片:
正常屏幕:
按下编辑框后的图片:
现在为什么这个标签栏会随着键盘而上移呢?我希望它保持在底部,即使用户通过点击编辑文本来打开键盘。
那么我应该怎么做呢?
请帮助我解决这个问题。
我的TabBarMain活动的XML布局如下:
<?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="wrap_content"
>
<LinearLayout
android:id="@+id/LL1"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="0"/>
</LinearLayout>
</TabHost>
所以请帮助我完成这项任务。谢谢。
adjustPan
之后,你的 EditTextView 不会从屏幕顶部消失了吗?请告诉我你是如何解决这个问题的。 - Anuj