I'm using ListViewDraggingAnimation by DevBytes, but it seems broken on Android Lollipop developer preview 2 (LPX13D). When I drag a row over other rows, those rows will disappear and become no longer clickable (see below). I tried disabling hardware acceleration for the listview but it didn't have any effect.
Has anyone experienced the same issue? Any hints? Thanks :)
I found the problem. It came from this flag. StableArrayAdapter.hasStableId
.
It fix all problem from this view on Lollipop.
@Override public boolean hasStableIds() { return android.os.Build.VERSION.SDK_INT < 20; }
To be honest, I don't what causes the problem, but this fix makes no visual errors anymore on any version. And because all that was changed is just visibility of view, I believe it shouldn't create any new functional problems.
Replace this code in function handleCellSwitch()
in class DynamicListView
:
mobileView.setVisibility(View.VISIBLE); switchView.setVisibility(View.INVISIBLE);
for
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT){ mobileView.setVisibility(View.VISIBLE); switchView.setVisibility(View.INVISIBLE); } else{ mobileView.setVisibility(View.INVISIBLE); switchView.setVisibility(View.VISIBLE); }
I tried tinkering with the code and in the end I found a way how to make it display as it was before. But fixing the problem for Lollipop made the same problem appear on KitKat and previous versions instead. So I applied the fix only for android versions higher than KitKat.
My guess is that these two views gets exchanged in the process for some reason on the new Lollipop version. In effect, one of the views gets always displayed while the other one gets always hidden. Would be nice to know where and what was changed in the lollipop android code though...
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