Skip to content

Commit

Permalink
Add progress bar when loading comments in Android
Browse files Browse the repository at this point in the history
  • Loading branch information
sastred committed Jun 13, 2016
1 parent dd5566a commit 73b4681
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions app/MnmComments.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import React, { Component } from 'react'
import {
StyleSheet,
Platform,
PixelRatio,
View,
Text,
ActivityIndicatorIOS,
ProgressBarAndroid,
ListView
} from 'react-native'

Expand Down Expand Up @@ -90,12 +92,19 @@ class MnmComments extends Component {
/>
)
} else {
if (Platform.OS === 'ios') {
return (
<ActivityIndicatorIOS
animating={true}
style={styles.centering}
color='#262626'
/>
)
}
return (
<ActivityIndicatorIOS
animating={true}
style={styles.centering}
color='#262626'
/>
<View style={styles.centering}>
<ProgressBarAndroid style={styles.progressBar} color="#d35400"/>
</View>
)
}
}
Expand Down Expand Up @@ -181,6 +190,10 @@ var styles = StyleSheet.create({
justifyContent: 'center',
backgroundColor: '#FAFAFA',
},
progressBar: {
width: 50,
height: 50,
},
});

const htmlStyles = StyleSheet.create({
Expand Down

0 comments on commit 73b4681

Please sign in to comment.