1. In the top layer of the main listview item XML, I used linearlayout to set Android: descendantfocusability = "blocksdescendants"
And set the main listview Android: focusable = "false"
Sublistview events and button events
// Listview event
Viewholder. listview. setonitemclicklistener ( New Listv_goods ()); Private Class Listv_goods Implements Onitemclicklistener {@ override Public Void Onitemclick (adapterview <?> Parent, view, Int Position, Long ID ){ // Todo auto-generated method stub Map <string, string> item = (Map <string, string> ) Parent. getitematposition (position); toast. maketext (context, item. Get ( "Name" ), Toast. length_long). Show ();}}
Button
Viewholder. btn_track.setonclicklistener ( New Btnonclick (position )); Private Class Btnonclick Implements Onclicklistener { Int Position; Public Btnonclick ( Int Pos) {position = Pos;} @ override Public Void Onclick (view v ){ // Todo auto-generated method stub If (V. GETID () =R. Id. btn_track) {toast. maketext (context, listmaps. Get (position). Get ( "Orderid" ), Toast. length_long). Show ();}}}