Remove item from custom listview on button click

后端 未结 4 707
我在风中等你
我在风中等你 2021-01-02 23:34

I have a custom listview, that has 2 textviews and 2 buttons (play and delete button) I want when I click the delete button to delete the current line.

My adapter cl

4条回答
  •  既然无缘
    2021-01-03 00:20

    try this

    b2.setOnClickListener(new OnClickListener() {
    
            @Override
            public void onClick(View arg0) {
                lista.remove(position);
                SunetePreferateAdaptor.notifyDataSetChanged();
            }
        });
    

提交回复
热议问题