Android cannot find method from button's onClick in ListView Row

后端 未结 4 1934
甜味超标
甜味超标 2021-01-18 23:10

I have a ListView populated from a custom adapter. Each row has 1 button in it. In the xml the button has the onClick attribute passed. I have only the xml, not any OnClickL

4条回答
  •  自闭症患者
    2021-01-19 00:05

    I'm assuming you wrote a custom adapter for this view so in your adapter when you call getView simply findElementById on the button and set the onClickListener there.

提交回复
热议问题