android - RecyclerView: toggling visibility of a children of all visible rows -
i have horizontal recyclerview. do, is, @ runtime, hide 2 textviews of items adapter.
so, do, cycle through visible items, layout, , change visibility of textviews inside each children.
you can see "simple layout" vs "complex layout" toggle.
i know should retrieve recyclerview children through assigned recyclerview.adapter, best solution?
thank lot help.
my code:
public viewholder(view v) { super(v); // logic here find children v.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // adapter here, loop visible children, , change visibility? // following line clicked item only: tvwind.setvisibility(tvwind.getvisibility()==view.visible?view.gone:view.visible); } }); }
from above code, can change visibility of clicked item, not visible items.
as discussed can achieved toggling visibility inside onbindviewholder() of adapter.
Comments
Post a Comment