ArrayIndexOutOfBoundsException while dismissing Snackbar/ViewDragHelper

前端 未结 1 698
情深已故
情深已故 2020-12-17 20:21

After implementing the new Snackbar in a few of my applications, I am receiving the following error:

java.lang.ArrayIndexOutOfBoundsExceptio         


        
相关标签:
1条回答
  • 2020-12-17 20:42

    One solution I found was to make sure it was not "swipe-able" by using findViewById(android.R.id.content). This solution basically "avoids" and prevents the error from happening.

    Snackbar.make(findViewById(android.R.id.content), "Hello!", Snackbar.LENGTH_LONG);
    

    Should be fixed in 23.2.1: https://stackoverflow.com/a/36004008/950427

    0 讨论(0)
提交回复
热议问题