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
Describe the Bug
Using the WormIndicatorType can cause a crash (IllegalArgumentException: Padding must be non-negative) if the user forces RTL layout direction.
Steps to Reproduce
Steps to reproduce the behavior:
Go to System Settings > Developer Options
Enable 'Force RTL layout direction'
Open a sample app that implements WormIndicatorType
Sample app crashes with IllegalArgumentException
Expected Behavior
App should not crash.
Actual Behavior
App crashes.
Screenshots or Videos
N/A
Environment
Library version: [5.1.0]
Android version: [14]
Device: [Samsung S22]
ViewPager for Jetpack Compose or XML: Jetpack Compose
ViewPager type: ViewPager2
Additional Context
The width measurements stays LTR direction, which results a bigger value of firstDotPositionX than the lastDotPositionX. The value of distanceBetween2DotsDp will be negative and multiplying with this value cause negative paddings.
Locally, I could fix the issue by getting the current LayoutDirection and setting the firstDotPositionX and lastDotPositionX based on that's value.
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
Describe the Bug
Using the WormIndicatorType can cause a crash (
IllegalArgumentException: Padding must be non-negative
) if the user forces RTL layout direction.Steps to Reproduce
Steps to reproduce the behavior:
WormIndicatorType
IllegalArgumentException
Expected Behavior
App should not crash.
Actual Behavior
App crashes.
Screenshots or Videos
N/A
Environment
Additional Context
The width measurements stays LTR direction, which results a bigger value of
firstDotPositionX
than thelastDotPositionX
. The value ofdistanceBetween2DotsDp
will be negative and multiplying with this value cause negative paddings.Locally, I could fix the issue by getting the current LayoutDirection and setting the
firstDotPositionX
andlastDotPositionX
based on that's value.The text was updated successfully, but these errors were encountered: