活动与片段。软键盘盖输入

时间:2015-02-01 08:12:55

标签: android android-layout android-fragments

使用LinearLayout和两个片段的活动:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment
    android:name="com.xmstr.myshoplist.ListZoneFragment"
    android:id="@+id/list_zone_fragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="1"
    tools:layout="@layout/list_zone" />
<fragment
    android:name="com.xmstr.myshoplist.NewItemZoneFragment"
    android:id="@+id/new_item_zone_fragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="8"
    tools:layout="@layout/newitem_zone" />
</LinearLayout>

第一个片段仅包含ListView 第二个片段是&#34;添加新项目区域&#34;: EditText和&#34;添加按钮&#34;

问题: 出现软键盘时,它会覆盖EditText输入。 尝试过清单功能,例如:ajustResize,ajustPan。他们没有帮助。键盘仍然覆盖EditText或我看不到我的应用程序的操作栏

我想要什么: 第一个片段必须是静态的,并且不能在所有情况下重新调整大小。 第二个片段是否可以粘贴到软键盘的顶部边框(当它出现时)并随之向上移动?

如何处理?或问题是我如何在我的xml中使用layout_weight?

0 个答案:

没有答案
相关问题