-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Android] Implement fading edges for ScrollView and it's dependent FlatList #26163
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,4 +276,15 @@ public void setOverflow(ReactHorizontalScrollView view, @Nullable String overflo | |
public void setPersistentScrollbar(ReactHorizontalScrollView view, boolean value) { | ||
view.setScrollbarFadingEnabled(!value); | ||
} | ||
|
||
@ReactProp(name = "fadingEdgeLength") | ||
public void setFadingEdgeLength(ReactHorizontalScrollView view, int value) { | ||
if (value > 0) { | ||
view.setHorizontalFadingEdgeEnabled(true); | ||
view.setFadingEdgeLength(value); | ||
} else { | ||
view.setHorizontalFadingEdgeEnabled(false); | ||
view.setFadingEdgeLength(0); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, just checking this one last time made me realize that if the prop is set to 0 it should become disabled again. I think this needs the following, right?
In both files There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, you're right, this might apply to dev environments where the prop is changed quite often. Maybe the fading edge length should also be reset? |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see you added an android check - that's fine.