0
我在活動中有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"
不工作。
感謝