Is it possible to remove view or adapter from MergeAdapter somehow? I'd try to extend it and remove the view from pieces but it's private. Or maybe there's an alternative solution to show/hide view in this adapter? I tried to set its layout_height to zero and visibility to View.GONE, but it still shows the empty list item. Thanks in advance.
To remove a view or an adapter from MergeAdapter use the following methods:
setActive() on your mergeAdapter Instance.
For Example :
To remove a Textview (mytextView) from a MergeAdapter(merAdapter) use:
merAdapter.setActive(mytextViiew,false);
And to enable it again(to make it visible) use:
merAdapter.setActive(mytextViiew,true);
Refer the MergeAdapter documentation for details:
https://github.com/commonsguy/cwac-merge
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With