-1
嗯,我一直在嘗試這一整天,但我找不到錯誤,並且我處於死亡狀態。我有一個xml文件,我有一個列表視圖和我的列表我想要一個AutoCompleteTextView,我將用它作爲搜索欄。問題是,在我的xml文件中,一切似乎都很好,並且出現了listview和AutoCompleteTextView,但是當我在模擬器中運行我的應用程序只打印列表視圖。我試圖使用editText而不是autocoplete,但又沒有發生任何事情。這裏是我的xml文件AutoCompleteTextView不會出現在列表視圖上方
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".sqlviewpatients" >
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<AutoCompleteTextView
android:id="@+id/autoCompleteTextView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_weight="1"
android:ems="10"
android:text="AutoCompleteTextView" />
</RelativeLayout>
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/relativeLayout1" >
</ListView>
</RelativeLayout>
請告訴我我做錯了什麼?我不知道我還能做什麼