安卓视图项目不固定在屏幕上

问题描述:

我有我的android项目的以下xml文件。安卓视图项目不固定在屏幕上

我的问题是放置在列表下的按钮更改其在列表数据上的位置。

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" android:weightSum="1"> 
    <EditText android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/EditTextId"/> 
    <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:id="@+id/Id2" android:text="@string/ButtonStr"></Button> 
    <ListView android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@android:id/android:list"></ListView> 
    <FrameLayout android:id="@+id/frameLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="0.84"></FrameLayout> 
    <ImageView android:id="@+id/Id1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/button"></ImageView> 

</LinearLayout> 

我建议,如果你不想你的按钮转向地方周围添加列表滚动型 http://developer.android.com/reference/android/widget/ScrollView.html