현재 저장된 정보를 화면에 표시하기 위한 ListView를 생성하도록 하고 있습니다.


---------------------------------------------

  TextView

 icon   TextView                             RadioButton       

---------------------------------------------

  TextView

 icon   TextView                             RadioButton       

---------------------------------------------

.....

위와 같은 모양의 ListView를 생성하고 선택하도록 하고 싶은데요.


그런데 xml상에 구조로 위와 같은 형태로 디자인은 했는데요. 


TextView 에 정보를 뿌리는것 까지는 성공했는데요.

리스트 클릭시 라디오 버튼에서 아무런 반응이 없습니다.


아직 초보중의 초보라 이런저런 자료를 찾아봐도 당췌 답을 찾을 수가 없어서 질문드립니다.


ListView.java >>>>>>>>>>>>>>>>>>>>>>>>


public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.mainlist);

DBAdapter dbAdapter = new DBAdapter(this);

Cursor cursor = dbAdapter.selectAllCameraItem();

dbAdapter.close();

m_CursorAdapter = new CameraDataAdapter(this, cursor, true);

setListAdapter(m_CursorAdapter);

ListView lv = getListView();

lv.setItemsCanFocus(false);

lv.setChoiceMode(lv.CHOICE_MODE_SINGLE);

}

Adapter.java>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


...

/**

* 현재 표시되는 리스트 view 에 Cursor 연동.

* @see android.widget.CursorAdapter#bindView(View, Context, Cursor) 

*/

@Override

public void bindView(View view, Context context, Cursor cursor) {

Log.d(TAG, "bindView : " + cursor.getCount());

ImageView imageview = (ImageView)view.findViewById(R.id.cameraIcon);

TextView cameraName = (TextView)view.findViewById(R.id.cameraName);

TextView cameraIp = (TextView)view.findViewById(R.id.cameraIp);

if(cameraName != null)

cameraName.setText(cursor.getString(cursor.getColumnIndex(CameraData.USERNAME)));

if(cameraIp != null)

cameraIp.setText(cursor.getString(cursor.getColumnIndex(CameraData.IPADDRESS)));

//Icon 이미지 삽입

}

/**

* Cursor 에 연동될  리스트 View 를 생성.

* @see android.widget.CursorAdapter#newView(Context, Cursor, ViewGroup)

*/

@Override

public View newView(Context context, Cursor cursor, ViewGroup parent) {

Log.d(TAG, "Call newView ---");

View view = m_Inflater.inflate(R.layout.camlist_row, null);

return view;

// return m_Inflater.inflate(R.layout.list, null);

}

....


list.xml>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


<LinearLayout

xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="horizontal"

android:layout_width="fill_parent"

android:layout_height="80dp" > 

<ImageView

android:id="@+id/cameraIcon"

android:layout_width="65dp"

android:layout_height="50dp"

android:layout_gravity="center_vertical"

android:layout_marginTop="15dp" 

android:layout_marginBottom="15dp"

android:layout_marginLeft="5dp" 

android:background="#FFFFFFFF" />

<LinearLayout

android:orientation="vertical"

android:layout_width="200dp"

android:layout_height="50dp" 

android:layout_marginTop="10dp"

android:layout_marginBottom="15dp"

>

<TextView

android:id="@+id/cameraName"

android:paddingLeft="10dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content" 

android:textSize="20dp" />

<TextView

android:id="@+id/cameraIp"

android:paddingLeft="10dp"

android:layout_marginTop="3dp"

android:layout_width="wrap_content"

android:layout_height="wrap_content" 

android:textSize="15dp" />

</LinearLayout>

<RadioButton

android:id="@+id/radiobtn"

android:layout_width="wrap_content"

android:layout_marginRight="10dp"

android:layout_height="fill_parent"/>

</LinearLayout>


가입후 첫글이라 정확한 질문인지 모르겠습니다.


많은 지적 부탁드립니다.