跳至主要内容

博文

目前显示的是 一月, 2013的博文

how to open context menu for android listview item button

Like title, here is this problem in my activity like this: An more button in every row of listview item . When I click this more button then show activity context menu. So I try to click button, but open context menu is the Adaper's context menu. My  Adapter  is extends from BaseAdapter ,  BaseAdapter  has not context menu. My solution like example : <ImageButton android:id="@+id/more" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight="15dp" android:background="#00000000" android:src="@drawable/btn_addressbook_more" android:onClick="onMoreClick"/> Add an event named  onMoreClick , when user click this button will do  onClick  event in  activity . // maybe you can registe