A mapview in a scrollview should not leave behind a black box when scrolled.
This works in Android 4.x but NOT in Android 2.3.x
var MapModule = require('ti.map');
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
var vert = Ti.UI.createScrollView({
contentHeight: 'auto',
scrollType: 'vertical',
showVerticalScrollIndicator: true,
layout:'vertical',
canCancelEvents: false,
width: Ti.UI.SIZE
});
var mapview = MapModule.createView({
height: 250,
mapType: MapModule.NORMAL_TYPE,
region: {latitude: -33.87365, longitude: 151.20689, latitudeDelta: 0.1, longitudeDelta: 0.1 },
});
vert.add(Ti.UI.createView({
height: 200, width: 100, backgroundColor: 'red'
}))
vert.add(Ti.UI.createView({
height: 150, width: 100, backgroundColor: 'blue'
}))
vert.add(mapview);
vert.add(Ti.UI.createView({
height: 300, width: 100, backgroundColor: 'green'
}))
win.add(vert);
win.open();
The method of having scroll views within scroll views will not work (100% of the time) in android. The way that views are nested in the android OS does not permit flawless implementation of nested scroll views. For this reason, we cannot support this method. This isn't an issue with the Titanium platform, rather a limitation applied by the Android SDK. So unfortunately we are unable fix this problem from our end. Regards, Carter
There are fixes natively if you follow this link. http://stackoverflow.com/questions/13746351/mapfragment-in-scrollview Following the idea from that discussion, one can also fix this in appcelerator code. (shown below for those who may find this problem with their own apps later on)