I am currently developing a titanium app for android and iOs including an imageView which should be scrollable and scalable (via a slider). I already get this to work on iOs but on Android it is really hard to achieve the scrolling behaviour. I decided to use the TiTouchImageView module but the documentation only shows how to use it in a non-Alloy project. My current code looks like this:
if (Ti.Platform.osname == "android") {
var TiTouchImageView = require('org.iotashan.TiTouchImageView');
var androidImageView = TiTouchImageView.createView({
top: 0,
left: 0,
zoom: originalScaleValue,
maxZoom: originalScaleValue*2,
minZoom: originalScaleValue,
image: blob, });
$.androidInnerImageScrollView.add(androidImageView);
} else {
$.iosPicture.setImage(blob);
}
But is there a possibility to load this via the view.xml as an alloy component?
EDIT: I tried it using the module
tag in alloy:
<ScrollView id="androidInnerImageScrollView">
<Module module="org.iotashan.titouchimageview" id="androidPicture"></Module>
</ScrollView>
But I keep getting this error message:
Uncaught Error: Requested module not found: org.iotashan.touchimageview