Android : Multiple Actions on a List View - Focus Issue

前端 未结 6 973
醉酒成梦
醉酒成梦 2021-02-06 02:55

I would like to implement a ListView, which I can do no problem w/ my cursor. Right now depending on which row you click on it takes you to a new activity based on the informati

6条回答
  •  别跟我提以往
    2021-02-06 03:31

    As Mariano Kamp said, adding buttons to a row will make it "untouchable", but in my experience, this problem goes away if you set these properties on the buttons:

        android:focusable="false"
        android:focusableInTouchMode="false"
    

    See also How to fire onListItemClick in Listactivity with buttons in list?

提交回复
热议问题