Created
October 10, 2014 20:23
-
-
Save AppWerft/b2e70fd2d18a2d9f1ae1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Modul = function() { | |
var options = arguments[0]; | |
var self = Ti.UI.createView({ | |
left : options.left, | |
top : options.top, | |
backgroundColor : 'silver', | |
width : options.width, | |
height : options.height | |
}); | |
self.add(Ti.UI.createImageView({ | |
width : options.width, | |
height : options.height, | |
image : options.image | |
})); | |
self.add(Ti.UI.createView({ | |
bottom : 0, | |
backgroundColor : 'black', | |
opacity : 0.6, | |
height : 60, | |
})); | |
self.add(Ti.UI.createLabel({ | |
width : options.width, | |
height : options.height, | |
color : 'white', | |
left : 5, | |
bottom : 5, | |
right : 5, | |
height : 30, | |
font : { | |
fontSize : 10.5 | |
}, | |
text : options.subtitle | |
})); | |
self.addEventListener('click', function(_e) { | |
console.log('imageclick'); | |
require('ui/catalog.window')().open({ | |
transition : Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT | |
}); | |
}); | |
return self; | |
}; | |
module.exports = Modul; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment