Android - Add item to custom listview on button click

后端 未结 2 537
暗喜
暗喜 2021-01-20 00:57

I currently have a custom listview where each item on the list contains two rows of text. What I would like to do is each time a user clicks on the button, it creates a new

2条回答
  •  野的像风
    2021-01-20 01:33

    It's as simple as adding a new element to your ArrayList (like you do in fillData), then calling adapter.notifyDataSetChanged().

提交回复
热议问题