두 개의 TextView (한 행에 나란히 표시)로 단일 선택 목록보기를 만들고 싶습니다.단일 선택 ListView 사용자 정의 행 레이아웃
사실 저는 사용자가 크기 가격 값에 따라 제품을 선택할 수있게하고 싶습니다. 이러한 값은 크기 - 가격 값을 나타내는 두 개의 TextView와 함께 해당 ListView에 표시됩니다.
문제는 단일 선택 목록으로 만들 수 없다는 것입니다 (또한 앞에 라디오 버튼이 있음). 아래는 내가 사용하고있는 행 레이아웃입니다 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:id="@+id/rowLayout" >
<TextView
android:id="@+id/tv_size"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:text="Size"
android:textSize="15sp" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Price"
android:textSize="15sp" />
<RadioButton
android:id="@+id/radioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right" />
</LinearLayout>
Java로 코딩하는 방법을 알려주십시오. simple_list_item_2 레이아웃으로 가능하다면 어떻게됩니까?
나는 비슷한 질문에 대답했습니다 : http://stackoverflow.com/questions/8295560/listview-with-checkbox-why-the-checkbox-doesnt-show – QuickNick