2011-05-16 6 views
0

어떻게 내 autocomlete 목록의 배경으로 이미지를 설정할 수 있습니까?자동 완성보기에서 배경 설정 android

<?xml version="1.0" encoding="utf-8"?> 
<TextView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:padding="10dp" 
    android:textSize="16sp" 
    android:textColor="#000"> 
</TextView> 

AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autocomplete_friends); 
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.list_item, friendsListNameOrder); 
    textView.setAdapter(adapter); 

은 텍스트 뷰의 배경 속성을 넣어 당신의 XML 당신에게

답변

1

감사합니다!

<TextView android:background="@drawable/your_img" ... other attributes /> 
+0

텍스트보기가 포함 된 페이지의 배경을 설정하고 싶습니다 .... 드롭 다운 목록의 배경이 없습니다. – magemello

+0

나는 당신이하려는 것을 이해하지 못합니까? TextView의 배경을 바꾸고 싶다면 대답에서 지적한대로해야합니다. 다른 배경의 배경을 변경하려면 다른보기의 'android : background' 속성을 설정하십시오. 당신의 질문을 더 명확히하려고 노력합니까? – Gix

+0

안드로이드에서 autocomoplete texview를 사용한 적이 있습니까? – magemello

0

이 다른 사람을 도움이 될 수 있습니다 .. 내가 이것을이었다 당신이 찾고 있던 어떻게 생각 :

textView.setDropDownBackgroundResource(); 

또는

searchBox.setDropDownBackgroundDrawable();