1

I have a recycler view with flex layout, when the Notify data change is called the flex layout changes the row count to 3 from 4 and the text gets a break. Below is the code to set the Flex layout.

layoutManager = new FlexboxLayoutManager(context);
layoutManager.setFlexDirection(FlexDirection.ROW);
layoutManager.setJustifyContent(JustifyContent.SPACE_EVENLY);
layoutManager.setAlignItems(AlignItems.CENTER);
layoutManager.setFlexWrap(FlexWrap.WRAP);
recyclerViewMoods.setLayoutManager(layoutManager);

In an adapter, I am updating the item row with background color and font to bold when the user taps any item. Is there a way to update or recall the flexBox layout as I think the size of the font changes thus making the layout buggy when an item is selected?

Ravi Parmar
  • 968
  • 11
  • 28

0 Answers0