我使用ScrollView滚动列表如何使其水平显示为垂直
我也试过在不同的视图中结束,但它不起作用
例如:
<View>
<ScrollView>
.
.
.
</ScrollView>
<View>Run Code Online (Sandbox Code Playgroud)
我是反应原生新手,我正在构建一个应用程序来在按下按钮时播放声音,但我无法实现这一点,是因为我的代码中存在错误吗?另请建议播放声音的解决方案并提出更正建议
这是我的代码:
import React, { Component } from 'react';
import { StatusBar, Dimensions, Image, TouchableWithoutFeedback, Animated } from 'react-native';
import { Actions } from 'react-native-router-flux';
import Sound from 'react-native-sound';
const a = require('./Images/landing-bnt1-on.png');
const b = require('./Images/landing-bnt1.png');
const c = require('./Images/landing-bnt2-on.png');
const d = require('./Images/landing-bnt2.png');
const btnSound = new Sound('./Sounds/btn_sound.mp3');
const w = Dimensions.get('window').width;
const h = Dimensions.get('window').height;
class MainScreen extends Component {
state = {
computerPressed: false,
teamPressed: false
}
componentWillMount() {
this.slide1 = new Animated.Value(0);
this.slide2 = new …Run Code Online (Sandbox Code Playgroud)