선형 레이아웃의 Android를 기본보기로 만들고 싶습니다. 거기에는 각 행에 대한 수평 선형 레이아웃이 있고, 각 행에는 이미지와 설명, 가격 및 ID가 표시됩니다 (표시되지 않음).선형 레이아웃의 모든 콘텐츠를 클릭 가능한 항목으로 만드는 방법
일단 모든 항목에서 목록을 삭제하면 사용자가 행의 아무 곳이나 클릭 할 수 있기를 원합니다. 내가 어떻게 할 수 있니? 사용자 지정 목록보기를 원하는처럼
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:onClick="menuItemSelected" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/burger" />
<TextView
android:id="@+id/editText1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:ems="10"
android:inputType="textMultiLine"
android:text="This a pictuer of a hamburger" />
<TextView
android:id="@+id/editText2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ems="10"
android:inputType="numberDecimal"
android:text="R41.24" />
</LinearLayout>
<LinearLayout
android:id="@+id/tableRow12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:onClick="menuItemSelected" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="Product Image"
android:src="@drawable/burger" />
<TextView
android:id="@+id/editText21"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:ems="10"
android:inputType="textMultiLine"
android:text="This a pictuer of a hamburger" />
<TextView
android:id="@+id/editText22"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ems="10"
android:inputType="numberDecimal"
android:text="R41.24" />
</LinearLayout>
'onClick = "MenuItemSelected"와 동일하지 않습니까? – Zapnologica