Skip to content

Commit

Permalink
修改course5.js文件
Browse files Browse the repository at this point in the history
  • Loading branch information
lichuanjun committed Jun 16, 2016
1 parent b80db77 commit 9b56432
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions view/component/course5.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
} from 'react-native';

import Util from '../utils';
import TimerMixin from 'react-timer-mixin';

class ProgressViewExample extends Component{
mixins: [TimerMixin];

constructor() {
super()
Expand All @@ -31,7 +29,6 @@
updateProgress() {
var progress = this.state.progress + 0.01;
this.setState({ progress });
// this.requestAnimationFrame(() => this.updateProgress());
}

getProgress(offset) {
Expand All @@ -43,7 +40,7 @@
return (
<View style={styles.container}>
<ProgressViewIOS style={styles.progressView} progress={this.getProgress(0)}/>
<ProgressViewIOS style={styles.progressView} progressTintColor="purple" progress={this.getProgress(0.2)}/>
<ProgressViewIOS style={styles.progressView} progressTintColor="purple" trackTintColor="green" progress={this.getProgress(0.2)}/>
<ProgressViewIOS style={styles.progressView} progressTintColor="red" progress={this.getProgress(0.4)}/>
<ProgressViewIOS style={styles.progressView} progressTintColor="orange" progress={this.getProgress(0.6)}/>
<ProgressViewIOS style={styles.progressView} progressTintColor="yellow" progress={this.getProgress(0.8)}/>
Expand Down Expand Up @@ -80,10 +77,12 @@
alignSelf:'center',
},
container: {
marginTop: 20,
marginTop: 30,
backgroundColor: 'transparent',
marginLeft:20,
marginRight:20
},
progressView: {
marginTop: 20,
marginTop: 30,
}
});

0 comments on commit 9b56432

Please sign in to comment.