Skip to content

Commit

Permalink
use view.getPaddingStart() directly (facebook#45150)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#45150

As the androidx.core 1.13.1 change, ViewCompact.getPaddingStart and getPaddingEnd are deprecated.

based on the suggestion from the, use :
 {F1717102270}

Reviewed By: alanleedev

Differential Revision: D58955567
  • Loading branch information
Peng Jiang authored and facebook-github-bot committed Jun 25, 2024
1 parent 873c715 commit cf33068
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import android.graphics.Point
import android.view.View
import android.view.ViewGroup
import android.widget.OverScroller
import androidx.core.view.ViewCompat
import com.facebook.common.logging.FLog
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.WritableMap
Expand Down Expand Up @@ -434,10 +433,7 @@ public object ReactScrollViewHelper {
scroller.setFriction(1.0f - scrollState.decelerationRate)

// predict where a fling would end up so we can scroll to the nearest snap offset
val width =
(scrollView.width -
ViewCompat.getPaddingStart(scrollView) -
ViewCompat.getPaddingEnd(scrollView))
val width = scrollView.width - scrollView.getPaddingStart() - scrollView.getPaddingEnd()
val height = scrollView.height - scrollView.paddingBottom - scrollView.paddingTop
val finalAnimatedPositionScroll = scrollState.finalAnimatedPositionScroll
scroller.fling(
Expand Down

0 comments on commit cf33068

Please sign in to comment.