在android中显示虚拟键盘的列表视图
问题描述:
我在活动中有edittext视图和listview。如果用户点击我的屏幕布局正在上升时到达的edittext虚拟键盘。如果虚拟键盘在我的屏幕正在关闭时隐藏。我如何避免这种情况?我希望布局处于相同的位置,并向用户显示虚拟键盘上述布局。我在布局中使用了listview,所以只有布局正在向上移动。任何人都可以告诉我如何避免使用列表视图移动布局? 这是我的布局文件:在android中显示虚拟键盘的列表视图
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@color/white" android:id="@+id/mainrelativelayout" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white">
<TableRow>
<EditText android:layout_column="0" android:focusable="true" android:focusableInTouchMode="true" android:id="@+id/edtsearch" android:singleLine="true" android:hint="Enter company name or ticker" android:layout_width="300dip" android:layout_height="40dip" android:textSize="13dip" android:textColor="@color/gray1"></EditText>
<ImageView android:layout_column="1" android:src="@drawable/clearbutton" android:paddingTop="5dip" android:id="@+id/imgsearch" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView>
</TableRow>
<TableRow>
<ListView android:layout_column="0" android:layout_span="2" android:id="@+id/lstcontent" android:layout_width="wrap_content" android:layout_height="wrap_content"></ListView>
</TableRow>
</TableLayout>
<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="30dip"
android:id="@+id/imglinear"
android:background="@color/white"
android:layout_alignParentBottom="true"
android:paddingTop="5dip"
android:orientation="horizontal"
>
<TableRow>
<ImageView android:id="@+id/ImageView15" android:paddingRight="20dip" android:layout_gravity="left" android:src="@drawable/questbutton" android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView>
</TableRow>
</TableLayout>
</RelativeLayout>
任何帮助,将不胜感激
我甚至在AndroidManifest.xml了:
android:windowSoftInputMode="adjustPan|adjustResize"
不工作。
感谢