小编Aka*_*h s的帖子

我想要 2 个按钮并排反应原生

我是本机反应的新手,我正在尝试并排实现 2 个按钮我已经尝试过但我无法实现它,因为我已经插入了 2 个按钮它出现在另一个下面

这是我的代码:

      <View style={styles.buttonStyle}>
        <Button
         title={"Pause"}
         style={styles.buttonStyle}
         onPress={() => {
           this.setState({ paused: true });
         }}
          color="#841584"
        />
        </View>
         <View style={styles.buttonStyle}>
          <Button
             title={"Play"}
            onPress={() => {
            this.setState({ paused: false });
         }}
         color="green"
       />
      </View>
     </View>
     );
    }
   }
  const styles = StyleSheet.create({
     backgroundVideo: {
    position: "absolute",
    top: 0,
    left: 0,
    bottom: 0,
   right: 0
  },
 buttonStyle: {
    marginHorizontal: 20,
    marginTop: 5
  }
 });
 export default VideoPlayer;
Run Code Online (Sandbox Code Playgroud)

button react-native

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

button ×1

react-native ×1