Change visibility of a view in all items of recyclerview

Viewed 2676

I have a CheckBox in my recyclerview items with Gone visibility . I want to make it visible for all items in recyclerview when I have a longClick on one of items .so I did this :

    holder.faviorateVideoItemRelative.setOnLongClickListener(new View.OnLongClickListener() {
        public boolean onLongClick(View arg0) {
            holder.chk_faviorateVideo.setVisibility(View.VISIBLE);
           // holder.chk_faviorateVideo.setChecked(!holder.chk_faviorateVideo.isChecked());
            return  true ;
        }
    });

but this will make CheckBox visible just for current item . I even moved my code to my ViewHolder class, but nothing changed . how can I do that without loop or redrawing of recyclerview ? I need to do something like android's default file manager long press and selecting . thanks in advance .

2 Answers
Related