0
我尝试在Titanium中实现可旋转和缩放的图像。我设法使这个工作正常,但我希望能够滚动图像周围,如果它比imageView更大。我尝试了几件事情,包括添加eventListeners并使用zIndex将正确的视图移到前面,但没有任何帮助。我也尝试了bubbleParent函数,没有任何其他结果。我希望你们中的一些人知道如何达到预期的行为。Titanium scrollView没有反应
XML:
<ScrollView id="imageScrollView">
<View id="pictureView">
<ImageView id="picture" ></ImageView>
</View>
</ScrollView>
TSS:
"#imageScrollView": {
top: "0",
left: "0",
height: "120",
width: "47%",
showHorizontalScrollIndicator: "true",
showVerticalScrollIndicator: "true",
maxZoomScale: "5",
minZoomScale: "1",
backgroundColor: "white",
scrollingEnabled: "true",
borderWidth: "1",
zIndex: "1050"
}
"#pictureView": {
top: "0",
left: "0",
height: "100%",
width: "100%",
bubbleParent: true
}
"#picture": {
top: "0",
left: "0",
height: "100%",
width: "100%",
borderWidth: "3",
borderColor: "red",
bubbleParent: true
}
而我的JS
$.imageScrollView.addEventListener("scroll", function(e) {
Ti.API.info("Triggered event");
});
$.pictureView.addEventListener("scroll", function(e) {
Ti.API.info("Triggered event");
});
试一下:Ti.UI.createScrollableView – 2014-10-10 12:55:50