2012-03-13 2 views

답변

0

그것은이

spinner_view.xml

<?xml version="1.0" encoding="utf-8"?> 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:orientation="horizontal" 
    android:layout_height="wrap_content"> 


    <TextView 
    android:id="@+id/imageNameSpinner" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"/> 


    <ImageView 
    android:id="@+id/xR.id.imageIconSpinner" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"/> 

</LinearLayout> 

list_editoradd_dialog.xml 같은 것 //이 어떻게 R.layout의 XML에 대한 최소한의

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:orientation="vertical" > 


    <Spinner 
    android:id="@+id/spinnerAddImageList" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"/> 


</LinearLayout> 
+0

될 것이다. list_editoradd_dialog 및 R.layout.spinner_view? 감사. – MikeR

+0

내가 원래 준 것은 spinner_view였습니다. 나는 그것을 표시해야했다. list_editoradd_dialog.xml을 추가했습니다. – RasTheDestroyer

+0

이 예제를 실제로 Spinner를 실행하도록 만들 수 있습니까? 구문 적으로나 실행 중에 (실행을 허용하는 구문을 변경할 때) 문제가 여전히 발생합니다. 예를 들어, ((ImageView) convertView.findViewById (R.id.imageIconSpinner)) 구문에 Integer 캐스팅을 추가해야했습니다. setBackgroundResource ((Integer) dataRecieved.get (position) .get ("Icon"))); 당신의 도움을 주셔서 감사합니다. Mike – MikeR