如何避免在给定 allignParentButton = true...的相对布局中跳转布局?
我有一个相对布局,其中有两项,一项是列表,另一项是自定义布局。
在列表视图中可以编辑文本。当用户单击编辑文本时,会弹出软键盘。
那时,自定义布局将出现在键盘的顶部,
这给我输入值的空间非常小。
如何避免这种行为,是否有线性布局的解决方案......?
这是代码。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/tab_top_bg" android:orientation="vertical">
<include android:id="@+id/bottomNavigation2" layout="@layout/bottom_navign_other"
android:layout_width="fill_parent" android:layout_height="65dp"
android:layout_gravity="center_vertical"
android:layout_alignParentBottom="true" android:layout_marginLeft="4dp"
android:layout_marginRight="4dp" android:layout_marginTop="4dp"
android:layout_marginBottom="4dp" />
<ExpandableListView android:layout_width="fill_parent"
android:background="@drawable/tab_top_bg" android:layout_height="fill_parent"
android:id="@+id/list" android:cacheColorHint="#00000000"
android:focusableInTouchMode="true" android:listSelector="#00000000"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:layout_above="@id/bottomNavigation2">
</ExpandableListView>
</RelativeLayout>
提前致谢...!
I have a Relative layout, which has two items, one is list another is custom layout.
In list view edit texts are there. when user clicks on the edit text soft keyboard pops up.
Than time the custom layout will come on the top of the key board,
which gives my very less space to enter values.
How to avoid this behaviour, is there any solution with linear layout....?
Here is the code.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/tab_top_bg" android:orientation="vertical">
<include android:id="@+id/bottomNavigation2" layout="@layout/bottom_navign_other"
android:layout_width="fill_parent" android:layout_height="65dp"
android:layout_gravity="center_vertical"
android:layout_alignParentBottom="true" android:layout_marginLeft="4dp"
android:layout_marginRight="4dp" android:layout_marginTop="4dp"
android:layout_marginBottom="4dp" />
<ExpandableListView android:layout_width="fill_parent"
android:background="@drawable/tab_top_bg" android:layout_height="fill_parent"
android:id="@+id/list" android:cacheColorHint="#00000000"
android:focusableInTouchMode="true" android:listSelector="#00000000"
android:layout_marginLeft="4dp" android:layout_marginRight="4dp"
android:layout_above="@id/bottomNavigation2">
</ExpandableListView>
</RelativeLayout>
Thanks in advance...!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看 android:windowSoftInputMode
Take a look at android:windowSoftInputMode