mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-15 12:12:31 +08:00
Allow customized refreshControl in ScrollView for Android
Summary: Original Android's refreshControl in ScrollView is tightly coupled with AndroidSwipeRefreshLayout. If someone use `ref=` for RefreshControl in ScrollView, it does nothing since RefreshControl in Android return null. This change allows customized RefreshControl especially for `ref=` as well as making ScrollView's code clearer. Closes https://github.com/facebook/react-native/pull/5623 Reviewed By: svcscm Differential Revision: D2890072 Pulled By: nicklockwood fb-gh-sync-id: a8fc7746bcc050a6e46fedf3583979f4cb9021b6
This commit is contained in:
committed by
facebook-github-bot-1
parent
a0bed63f13
commit
6d65a90017
@@ -47,7 +47,7 @@ public class SwipeRefreshLayoutManager extends ViewGroupManager<ReactSwipeRefres
|
||||
view.setEnabled(enabled);
|
||||
}
|
||||
|
||||
@ReactProp(name = "colors")
|
||||
@ReactProp(name = "colors", customType = "ColorArray")
|
||||
public void setColors(ReactSwipeRefreshLayout view, @Nullable ReadableArray colors) {
|
||||
if (colors != null) {
|
||||
int[] colorValues = new int[colors.size()];
|
||||
|
||||
Reference in New Issue
Block a user