android - How to make all content in a linear layout be one clickable item -


i want make link in android linear layout main view. within there horizontal linear layout each row, in each row there image , description , price , id(wont displayed).

once have list off items want user able click on row , action. how can this? have tried settings clickable=true on linearlayout:

here xml code:

<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 pictuer of 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 pictuer of 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> 

it sounds me want custom listview: how make custom listview

this allow create scrollable, clickable, table of content. customizing can format content way you'd each row.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -