I'm working on a custom SwipeListView which allows to swipe cells to the left or to the right, currently only for Android. This works perfectly fine, but for some reason changing TranslationX of the Cell's ContentView affects other cells in the ListView. Every 8th cell changes it's TranslationX too (at least visually):
This is the line of code which results in this behavior:
mainContent.TranslationX = quota * Width + mainContentPositionX;
I've tried some possible solutions, none of them worked:
- Try every different
CachingStrategyfor theListView(RetainElement, RecycleElement, RecycleElementAndDataTemplate) - Run code on MainThread
- After manipulating
TranslationX, iterate through all other cells in myListViewand set theirTranslationXto 0
I was sure the problem is that the cell is being reused and that's why it applies the TranslationX manipulation, but if it's that then I'm confused why using CachingStrategy=RetainElement doesn't solve the issue.
I will also we grateful for ideas which help be to debug this problem.
Edit
I implemented the SwipeListView feature for iOS and it works without any problems. Seems to be an Android issue.
Edit - Github Repository
I have added a sample Github Repository: https://github.com/Zure1/SwipeListView-Sample
Edit
I can now confirm that this is only a problem in Android. iOS works fine.
