I am trying to implement recyclerView multi-selection but I get java.lang.IllegalArgumentException on StorageStrategy.createLongStorage()
here is my code
tracker = new SelectionTracker.Builder<>("selection1"
                , recyclerView
                , new StableIdKeyProvider(recyclerView)
                , new MyItemDetailsLookup(recyclerView)
                , StorageStrategy.createLongStorage())
                .withSelectionPredicate(SelectionPredicates.<Long>createSelectAnything())
                .build();
                You need to call recyclerView.setAdapter(...) before SelectionTracker.Builder<>(...).build()
This is probably because at this point the adapter of the RecyclerView has not been set.
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