Android: ListView elements with multiple clickable elements

后端 未结 7 734
忘了有多久
忘了有多久 2021-01-03 11:22

I\'ve a ListView where every element in the list contains a TextView and two different Buttons. Something like this:

ListView
------------------         


        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-03 11:40

    easy, just implement the OnClickListener for these two buttons, and get the position that you get from getView(), make sure you set the position to final in order to get it in OnClickListener

提交回复
热议问题