This documentation relates to previous versions of Titanium.

To see the latest documentation, visit

This space has been migrated to and will be removed from the Appcelerator wiki on August 9th, 2018

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
var button = Ti.UI.createButton({
    backgroundImage: '/images/myimage.png'

Nine-patch images only work as background images. For example, you can use a nine-patch image to set an ImageView's backgroundImage property but not the image property.

The project should be cleaned to ensure that the files are correctly copied to the project.

You may also use a nine-patch image for a splash screen.  For more information, refer to Icons and Splash Screens.

Hands-on Practice


In this activity, you will manage the hardware Back button so that the first time it's tapped, a full-screen view will be closed and after that your app will be closed.