A modified version of Android's experimental StaggeredGridView. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.
Im using the StaggeredGridView within a fragment. The initial rendering of the view works great. But if a register an OnItemClickListener and open some other fragment when the user selects an image, everytime I press the back button, I get the following exception
STACK_TRACE=java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at com.origamilabs.library.views.StaggeredGridView.populate(StaggeredGridView.java:963)
at com.origamilabs.library.views.StaggeredGridView.onLayout(StaggeredGridView.java:917)
at android.view.View.layout(View.java:14785)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:14785)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14785)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14785)
at android.view.ViewGroup.layout(ViewGroup.java:4631)
at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:653
Im using the StaggeredGridView within a fragment. The initial rendering of the view works great. But if a register an OnItemClickListener and open some other fragment when the user selects an image, everytime I press the back button, I get the following exception
STACK_TRACE=java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 at com.origamilabs.library.views.StaggeredGridView.populate(StaggeredGridView.java:963) at com.origamilabs.library.views.StaggeredGridView.onLayout(StaggeredGridView.java:917) at android.view.View.layout(View.java:14785) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055) at android.view.View.layout(View.java:14785) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14785) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14785) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:653
Any help appreciated, Regards, Dirk