Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Android Custom Events don't seem to bubble

$
0
0

I am having issues with custom events bubbling on a view in Android. Here is an example.

Button.js

function CreateButton(){
 
    var view = Ti.UI.createView({
        width: 100,
        height: 50,
        bubbleParent: true,
        top: 0
    });
 
    setTimeout(function(){view.fireEvent("hey");},1000);
 
    return view;
}       
 
module.exports = CreateButton;
In another file I instantiate the button;
var Button = require("Button");
 
var newButton = new Button();
 
newButton.addEventListener("hey", function(e){Ti.API.info("Ciao");});
I can never receive the event. It works in iOS but not on Android.

Is there a difference in the propagation? I can't seem to find anything in the docs.

Thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>