3
我有一個主要的View
組件包含一個ScrollView
圖像傳送帶和另一個View
,其中包括一些Text
組件。我想觸摸主要的View
並打開另一個應用視圖,但我也需要滾動圖像。如何在可觸摸組件中包含ScrollView?
我試圖把主View
內TouchableOpacity
(我也嘗試TouchableHighlight
和TouchableWithoutFeedback
太),它不能正常工作。
下面的代碼是我正在試圖解決這個問題:
<TouchableOpacity onPress={this.showView}>
<View style={styles.mainContainer}>
<ScrollView horizontal pagingEnabled>
{images.map((image, index) => (
<Image
key={index}
source={image}
/>
))}
</ScrollView>
<View style={styles.title}>
<View style={styles.rowContainer}>
<Text>{sample text}</Text>
</View>
</View>
</View>
</TouchableOpacity>
任何想法?
在此先感謝