O'Reilly logo

Creating Mobile Apps with Appcelerator Titanium by Christian Brousseau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Code while it is hot!

With our design in hand, we can now move on to create our user interface. Our entire application will be contained in a single window, so this is the first thing we will create. We will give it a title as well as a linear background gradient that changes from purple at the top to black at the bottom of the screen. Since we will add other components to it, we will keep its reference in the win variable:

var win = Ti.UI.createWindow({
  title: 'Unified Status',
  backgroundGradient: {
    type: 'linear',
    startPoint: { x: '0%', y: '0%' },
    endPoint: { x: '0%', y: '100%' },
    colors: [ { color: '#813eba'}, { color: '#000' } ]
  }
});

The top section

We will then add a new white label at the very top of the window. It will span 90% of the window's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required