2013-05-28 3 views
-1

저는 하루 종일이 작업을 시도했지만 오류를 찾을 수 없었습니다. 나는 목록보기 및 내 검색 모음으로 나중에 사용됩니다 AutoCompleteTextView 갖고 싶어 XML 파일이 있습니다. 문제는 내 XML 파일에서 모든 것 잘 보인다 및 listview 및 AutoCompleteTextView 때 나타납니다. 에뮬레이터에서 내 앱을 실행하면 목록보기 만 인쇄됩니다. autocoplete 대신 editText를 사용하려고했지만 다시는 아무 일도 일어나지 않았습니다. 여기 내 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> 

내가 뭘 잘못하고 있는지 말해 주시겠습니까? 그 밖의 무엇을 할 수 있는지 모르겠다.

답변

0

Ok 오류가 발견되었습니다. .java 파일에서 List Activity를 확장 시켰고 setContentView (R.layout.something)라는 오류가 있었지만 setContent가 주석이되어서는 안되었다! 2 일 동안 발견 했으므로 이 대답이 다른 사람들에게 도움이되기를 바랍니다.

관련 문제