You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
I have searched existing issues and confirmed this is not a duplicate
Issues and steps to reproduce
I have an issue with a flexbox. I have this code on oncreate the activity
_cfWoStatusList.HasFixedSize = false;
_llManagerWoStatusList = new FlexboxLayoutManager(Context);
_llManagerWoStatusList.FlexDirection = FlexDirection.Row;
_llManagerWoStatusList.FlexWrap = FlexWrap.Wrap;
_llManagerWoStatusList.JustifyContent = JustifyContent.FlexStart + JustifyContent.SpaceAround;
_llManagerWoStatusList.AlignItems = AlignItems.FlexStart + AlignContent.SpaceAround;
_llManagerWoStatusList.AutoMeasureEnabled = true;
_cfWoStatusList.SetLayoutManager(_llManagerWoStatusList);
FlexboxItemDecoration itemDecoration = new FlexboxItemDecoration(Context);
itemDecoration.SetOrientation(FlexboxItemDecoration.Horizontal);
itemDecoration.SetDrawable(Context.GetDrawable(Resource.Drawable.flexbox_divider_horizontal));
_cfWoStatusList.AddItemDecoration(itemDecoration);
_cfWoStatusItems = new List<CfWoStatusGrpModel>();
var _woUtils = new WoUtils();
_adapterWoStatusGrp = new DashboardWoStatusGrpAdapter(Screen.CurrentFragment, _cfWoStatusItems, _woUtils);
_cfWoStatusList.SetAdapter(_adapterWoStatusGrp);
Somethimes, I have this error java.lang.ArrayIndexOutOfBoundsException: length=10; index=-1
at com.google.android.flexbox.FlexboxLayoutManager.getPositionToFlexLineIndex(FlexboxLayoutManager.java:2565)
at com.google.android.flexbox.FlexboxItemDecoration.isFirstItemInLine(FlexboxItemDecoration.java:288)
at com.google.android.flexbox.FlexboxItemDecoration.setOffsetAlongMainAxis(FlexboxItemDecoration.java:155)
at com.google.android.flexbox.FlexboxItemDecoration.getItemOffsets(FlexboxItemDecoration.java:116)
I poupalte the list of itens on one adapter
Can you help me?
## Expected behavior
*Please describe what you expected would happen.*
## Version of the flexbox library
FlexboxLayout.Xamarin.Android nugget 3.0.0
## Link to code
*Please link to the code we can use to reproduce this issue.*
*A complete project we can build/run is preferred, if you can't provide one, please show*
*us relevant code*
Activity
runemart commentedon Nov 30, 2023
I'm seeing the same exception in Google Play crash list, and it's always "length=10; index=-1"
(Version 3.0.0).
kslakhani commentedon Jan 22, 2025
Did you find any solution yet?
kslakhani commentedon Jan 22, 2025
I have got the same issue and it happens randomly. Even the adapter is not empty.