I create a RecyclerView
like following:
recyclerView.setLayoutManager(new GridLayoutManager(getContext(), cols, LinearLayoutManager.VERTICAL, stickToBottom);
recyclerView.setAdapter(adapter);
// completely disable animations... just to test if this solves the problem
recyclerView.setItemAnimator(null);
I long press a icon and start scrolling and sometimes, this results in recycled views looking pressed... I'm using a simple "android:background="?android:attr/selectableItemBackground"
on my recyclerview items.
How can I solve the problem or what can be the root cause of this?
some facts
- recycling views works perfectly, texts and images update as they should
- ONLY the backgrounds are not resettet and look pressed even if the item is not touched...
- I'm using the
RecyclerView
in theWindowManager
not in an activity..