I have created one carousel view using module in android. Here everything is going fine. But how to handle click of individual image in this view. I can handle this easily in my native android code but I need to get listener in my app.js so when one image from carousel will be clicked I will get is name but I have no idea how to achieve this. Here is my code:-
var carouselandroid = require('com.carouselandroid');
var proxy = carouselandroid.createExample({ message : "Creating an example Proxy", width : Ti.UI.FILL, height : Ti.UI.SIZE, });
win.add(proxy);
proxy.addEventListener('click', function(e) { Ti.API.info('--------getting e: ' + JSON.stringify(e)); });
but listener is not called.
As I was unable to get click of proxy so I used fireEvent in my module but again I was unable to pass data using fireEvent may be I need to understand modules more. Nevertheless to achieve this I made one property of proxy in my module and then firing one method. This way it is working.