-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Appcelerator Titanium Smartphone App Development Cookbook Second Edition
By :
For our very last part of this application, we want to combine the two images together (being our me photograph and the funny face image we have chosen) and save them to the filesystem as one complete image. To do this, we will hook up the event listener of our save button control and use another common method found on almost all views and control types, toImage. Once we've combined both our images together and saved the resulting image off to the local filesystem, we'll then create a quick e-mail dialog and attach our funny face to it, allowing the user to send the complete image off to their friends!
Underneath the instantiation of your btnSave object, add the following event listener and handler code:
btnSave.addEventListener("click", function(e) {
//hide the footer
footer.visible = false;
//do a slight delay before capturing the image
//so we are certain the footer is hidden!
setTimeout(function(e) {
//get the...
Change the font size
Change margin width
Change background colour