mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
If somehow scroll position is set to -1 with and position offset greater than 0.5, we will decide it's a valid scroll position which causes NPE for selected child not found. Fixes this by checking if position is valid regardless the offset and falling back to 0 if a negative position is given. Resolves https://github.com/material-components/material-components-android/issues/2464 PiperOrigin-RevId: 408894188