Skip to content

Instantly share code, notes, and snippets.

@rajubd49
Created April 16, 2015 09:32
Show Gist options
  • Save rajubd49/ed2cfaa7771338e88626 to your computer and use it in GitHub Desktop.
Save rajubd49/ed2cfaa7771338e88626 to your computer and use it in GitHub Desktop.
Change Image in click listener - Appcelerator Titanium
var win = Ti.UI.createWindow();
var like = Titanium.UI.createImageView({
image : '/image1.png',
left : 50,
top : 50,
height : 50,
width : 50
});
like.addEventListener('click', function(e) {
e.source.image= '/image2.png';
});
win.add(like);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment