mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 03:50:11 +08:00
Cross platform ActivityIndicator
Summary: The API for `ActivityIndiatorIOS` and `ProgressBarAndroid` is very similar and can be merged in a cross platform component that displays a circular indeterminate loading indicator. This deprecates `ActivityIndiatorIOS` and non-horizontal `ProgressBarAndroid` in favor of this new component. **Test plan (required)** Tested with the ActivityIndicator example in UIExplorer on android and ios. Also made sure that `ActivityIndicatorIOS` still works and displays a deprecation warning. Also tested that `ProgressBarAndroid` with `indeterminate == true` and `styleAttr != 'Horizontal'` displays a deprecation warning. Closes https://github.com/facebook/react-native/pull/6897 Differential Revision: D3351607 Pulled By: dmmiller fbshipit-source-id: b107ce99d966359003e8b3118cd97b90fa1d3d7d
This commit is contained in:
committed by
Facebook Github Bot 1
parent
98dd91825f
commit
26e8426248
1
Libraries/react-native/react-native.js
vendored
1
Libraries/react-native/react-native.js
vendored
@@ -27,6 +27,7 @@ if (__DEV__) {
|
||||
// Export React, plus some native additions.
|
||||
const ReactNative = {
|
||||
// Components
|
||||
get ActivityIndicator() { return require('ActivityIndicator'); },
|
||||
get ActivityIndicatorIOS() { return require('ActivityIndicatorIOS'); },
|
||||
get ART() { return require('ReactNativeART'); },
|
||||
get DatePickerIOS() { return require('DatePickerIOS'); },
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
//
|
||||
var ReactNative = Object.assign(Object.create(require('ReactNative')), {
|
||||
// Components
|
||||
ActivityIndicator: require('ActivityIndicator'),
|
||||
ActivityIndicatorIOS: require('ActivityIndicatorIOS'),
|
||||
ART: require('ReactNativeART'),
|
||||
DatePickerIOS: require('DatePickerIOS'),
|
||||
|
||||
Reference in New Issue
Block a user