Browse Source

1.修改seekbar点击圆球问题

zhangmengjie 5 years ago
parent
commit
cfea009a57
1 changed files with 13 additions and 5 deletions
  1. 13 5
      pages/components/SeekBar.js

+ 13 - 5
pages/components/SeekBar.js

@@ -8,6 +8,7 @@ import {
   Button,
   PanResponder,
   findNodeHandle,
+  ImageBackground,
   UIManager,
   DeviceEventEmitter
 } from "react-native";
@@ -52,11 +53,9 @@ export default class SeekBar extends BasePage {
         }}
       >
         <View
-          //只有红线黄圆重叠处,点红线外圆点外部分无法选中
           style={{
-            height: 5,
-            width: "90%",
-            backgroundColor: "red"
+            height: 20,
+            width: "90%"
           }}
           ref={c => {
             this.progressBar = c;
@@ -74,6 +73,15 @@ export default class SeekBar extends BasePage {
             }, 0);
           }}
         >
+          <View
+            style={{
+              height: 5,
+              width: "100%",
+              backgroundColor: "red",
+              overflow: "hidden",
+              top: 8
+            }}
+          />
           <Image
             {...this._panResponder.panHandlers}
             style={{
@@ -83,7 +91,7 @@ export default class SeekBar extends BasePage {
               backgroundColor: "blue",
               transform: this.state.icon_transform,
               left: this.state.left,
-              top: -8
+              top: -4
             }}
           />
         </View>