我有点担心,因为我想要一个嵌套的scrollableview
,但他的工作是他的湿冷。我可以从右到左滚动,当我在第二张照片上时,我在另一个滚动视图滚动上打电话给我,但不是,所以它一定是我做错了。aillor 以及第二个垂直滚动是如何完成的?
滚动主体
Titanium.include('cover.js');
var win = Titanium.UI.createWindow({
backgroundColor:'#333',
//orientationModes:Titanium.UI.LANDSCAPE_LEFT
});
//Titanium.UI.orientation = Titanium.UI.LANDSCAPE_LEFT;
var rotate = Ti.UI.create2DMatrix().rotate(90);
var counterRotate = rotate.rotate(-180);
//create despicture for scroll
var repImage = 'res-long-land-hdpi';
var image = Ti.UI.createImageView({
image:'android/images/'+repImage+'/default.png'
});
//scroll principal
var scrollView = Titanium.UI.createScrollableView({
views:[image,cover],//cover call two scroll
maxZoomScale:1.0,
currentPage:0,
showPagingControl:false,
cacheSize:5,
zIndex:-100,
});
win.add(scrollView);
win.open();
第二个卷轴将进入第一个
cover = Titanium.UI.createView({
left:0,
top:0,
});
var repImage = 'res-long-land-hdpi';
var image1 = Ti.UI.createImageView({
image:'android/images/'+repImage+'/p1.jpg'
});
var image2 = Ti.UI.createImageView({
image:'android/images/'+repImage+'/p2.jpg'
});
// second scroll
var scrollView1 = Titanium.UI.createScrollableView({
views:[image1,image2],
maxZoomScale:1.0,
currentPage:0,
showPagingControl:false,
cacheSize:5,
zIndex:-100,
layout:'vertical'
});
cover.add(scrollView1);
谢谢你