I'm changing the width of a view and using view.isInLayout to decide whether to call requestLayout() or not.
But in some cases, even if view.isInLayout returns true in the function which updates the width, the width is not updated in UI.
Calling requestLayout() after updating the width, irrespective of layout's state makes the UI update as expected
However, requestLayout's official doc states, This (requestLayout) should not be called while the view hierarchy is currently in a layout pass.