Chapter 1. Building Apps using Native UI Components

In this chapter, we will cover:

  • Building with Windows and Views
  • Adding a TabGroup to your app
  • Creating and formatting Labels
  • Creating TextFields for user input
  • Working with keyboards and keyboard toolbars
  • Enhancing your App with Sliders and Switches
  • Passing custom variables between windows
  • Creating buttons and capturing click events
  • Informing your users with dialogs and alerts
  • Creating charts using Raphael JS

Introduction

The ability to create user-friendly layouts with rich, intuitive controls is an important factor in successful app design. With mobile apps and their minimal screen real estate, this becomes even more important. Titanium leverages a huge amount of native controls found in both the iPhone/iPod Touch and Android platforms, allowing the developer to create apps just as rich in functionality as those created by native language developers.

How does this compare to the mobile web? When it comes to HTML/CSS only mobile apps, savvy users can definitely tell the difference in comparison to a platform like Titanium, which allows you to use platform-specific conventions and access your iPhone or Android device's latest and greatest features. An application written in Titanium feels and operates like a native app since essentially all of the UI components are native. This means crisp, responsive UI components utilizing the full capabilities and power of your device.

Most other books at this point would start explaining the fundamental principles of Titanium and maybe give you a rundown on the architecture and expand on the required syntax.

Yawn...

We're not going to do that. Instead, we will be jumping straight into the fun stuff, building your user interface and making a real-world app! In this chapter, you'll learn:

  • How to build an app using Windows and Views, and understanding the differences between the two
  • Putting together a UI using all of the common components, including TextFields, Labels and Switches
  • Just how similar Titanium component properties are to CSS when formatting your UI

You can pick and choose any recipe from the chapter if you want since each one is a self-contained example that will explain a specific component or process. Alternatively, you can follow each chapter from beginning to end to put together a real-world app for calculating loan repayments which we will call LoanCalc from here on in.

Note

Complete source code for this entire chapter can be found in the /Chapter 1/LoanCalc folder.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.140.68