-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Fix to make taps on views outside parent bounds work on Android #29039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b09e768
Fix to make taps on views outside parent bounds work on Android
hsource d24abc0
Reused mTempPoint per original implementation
hsource 749df7e
Added fully-outside box to the overflow test case
hsource 1b63402
Made bounds checks also run on `overflow: scroll` Views
hsource 3548de7
Fixed behavior for ReactCompoundViewGroups for react-native-svg
hsource 0f2b2f8
Added better comments to example and Java code
hsource ee51bd4
Updated ExampleBox to use setState
hsource 4de4ad6
Fixed flow error by extracting component from JSX
hsource f988b95
Fixed ExampleBox in test case, added more new example
hsource bf06fc8
Merge branch 'main' into harry-android-overflow
JoshuaGross File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactOverflowView.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) Facebook, Inc. and its 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.uimanager; | ||
|
||
import android.graphics.Rect; | ||
import android.view.View; | ||
|
||
import androidx.annotation.Nullable; | ||
|
||
/** | ||
* Interface that should be implemented by {@link View} subclasses that support {@code | ||
* overflow} style. This allows the overflow information to be used by {@link TouchTargetHelper} | ||
* to determine if a View is touchable. | ||
*/ | ||
public interface ReactOverflowView { | ||
/** | ||
* Gets the overflow state of a view. If set, this should be one of {@link ViewProps#HIDDEN}, | ||
* {@link ViewProps#VISIBLE} or {@link ViewProps#SCROLL}. | ||
*/ | ||
@Nullable String getOverflow(); | ||
} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.