Skip to content

Commit

Permalink
Migrate ReactHitSlopView to kotlin
Browse files Browse the repository at this point in the history
Summary:
Migrate ReactHitSlopView to kotlin

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D51262574

fbshipit-source-id: 7ad625bcdff1525299a0a9c9cf3409d081231b3c
  • Loading branch information
mdvacca authored and facebook-github-bot committed Nov 15, 2023
1 parent 7f52791 commit 803c5bb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 27 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.touch

import android.graphics.Rect

/**
* This interface should be implemented by all [View] subclasses that want to use the hitSlop prop
* to extend their touch areas.
*/
interface ReactHitSlopView {
val hitSlopRect: Rect?
}
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ object ReactMapBufferPropSetter {
PixelUtil.toPixelFromDIP(value.getDouble(EDGE_RIGHT)).toInt(),
PixelUtil.toPixelFromDIP(value.getDouble(EDGE_BOTTOM)).toInt(),
)
hitSlopRect = rect
setHitSlopRect(rect)
}

private fun ReactViewGroup.importantForAccessibility(value: Int) {
Expand Down

0 comments on commit 803c5bb

Please sign in to comment.