TextView inside the Adapter not update

后端 未结 1 1059
轻奢々
轻奢々 2021-01-27 13:11

I\'m trying to update a text in a TextView inside the Adapter. The text visually not being displayed even using notifyDataSetChanged (). Use other visu

相关标签:
1条回答
  • 2021-01-27 13:32

    You should be updating your backing data model as that is what is used to refresh the list view when you call notifyDataSetChanged():

    holder.llLike.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            qa.setUp_count(qa.getUp_count() + 1);
            notifyDataSetChanged();
        }
    });
    
    0 讨论(0)
提交回复
热议问题