How can I update a single row in a ListView?

前端 未结 11 1987
时光说笑
时光说笑 2020-11-22 17:07

I have a ListView which displays news items. They contain an image, a title and some text. The image is loaded in a separate thread (with a queue and all) and w

11条回答
  •  花落未央
    2020-11-22 17:41

    exactly I used this

    private void updateSetTopState(int index) {
            View v = listview.getChildAt(index -
                    listview.getFirstVisiblePosition()+listview.getHeaderViewsCount());
    
            if(v == null)
                return;
    
            TextView aa = (TextView) v.findViewById(R.id.aa);
            aa.setVisibility(View.VISIBLE);
        }
    

提交回复
热议问题