Replace deprecated ActivityIndicatorIOS and ProgressBar with ActivityIndicator

Summary:
This replaces ActivityIndicatorIOS and indeterminate ProgressBar that were deprecated recently with ActivityIndicator across the codebase and examples and a few other cleanups.

This also make a small tweak to ActivityIndicator so it uses the Android theme color instead of gray when no color is specified.

Use Slider instead of SliderIOS in CameraRoll example.

Remove the line about unifying ActivityIndicator and ProgressBar.

**Test plan**
Tested the affected components in UIExplorer on iOS and Android, tested the changes made in Movies example on iOS and Android.
Closes https://github.com/facebook/react-native/pull/8082

Differential Revision: D3429770

fbshipit-source-id: 3b2e1196a8b9fe00d47a7aa1bbc079b094796421
This commit is contained in:
Janic Duplessis
2016-06-13 22:15:47 -07:00
committed by Facebook Github Bot 9
parent d344963123
commit 4c245160bd
11 changed files with 26 additions and 40 deletions

View File

@@ -19,7 +19,7 @@
var React = require('react');
var ReactNative = require('react-native');
var {
ActivityIndicatorIOS,
ActivityIndicator,
CameraRoll,
Image,
ListView,
@@ -141,7 +141,7 @@ var CameraRollView = React.createClass({
groupTypes: this.props.groupTypes,
assetType: this.props.assetType,
};
if (Platform.OS === "android") {
if (Platform.OS === 'android') {
// not supported in android
delete fetchParams.groupTypes;
}
@@ -191,7 +191,7 @@ var CameraRollView = React.createClass({
_renderFooterSpinner: function() {
if (!this.state.noMore) {
return <ActivityIndicatorIOS style={styles.spinner} />;
return <ActivityIndicator style={styles.spinner} />;
}
return null;
},