|
@@ -195,3 +195,40 @@ export default class SeekBar extends BasePage {
|
|
|
}
|
|
|
|
|
|
const styles = StyleSheet.create({});
|
|
|
+
|
|
|
+
|
|
|
+ <SeekBar
|
|
|
+ ref={view => (this.seekbar = view)}
|
|
|
+ max={100}
|
|
|
+
|
|
|
+ touchUpCallBack={this.touch_up_callback.bind(this)}
|
|
|
+ progress={this.state.curprogress}
|
|
|
+ />
|
|
|
+
|
|
|
+
|
|
|
+ touch_up_callback(progress) {
|
|
|
+
|
|
|
+ this.setState({
|
|
|
+ curprogress: progress
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ setProgressIcon() {
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ if (!this.seekbar.getTouchDown()) {
|
|
|
+ this.setState({
|
|
|
+ curprogress: this.state.curprogress + 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.state.curprogress >= 100) {
|
|
|
+ alert("100了");
|
|
|
+ } else {
|
|
|
+ this.setProgressIcon();
|
|
|
+ }
|
|
|
+ this.seekbar.setProgress(this.state.curprogress);
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+
|
|
|
+ */
|