官术网_书友最值得收藏!

Introduction

The ability to create user-friendly layouts with rich, intuitive controls is an important factor in successful app designs. With mobile apps and their minimal screen real estate, this becomes even more important. Titanium leverages a huge amount quantity of native controls found in both the iOS and Android platforms, allowing a 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 between them and a platform such as Titanium, which allows you to use platform-specific conventions and access your iOS or Android device's latest and greatest features. An application written in Titanium feels and operates like a native app, because all the UI components are essentially native. This means crisp, responsive UI components utilizing the full capabilities and power of your device.

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

Yawn...!

We're not going to do that, but if you want to find out more about the differences between Titanium and PhoneGap, check out http://www.appcelerator.com/blog/2012/05/comparing-titanium-and-phonegap/.

Instead, we'll be jumping straight into the fun stuff: building our user interface and making a real-world app! In this chapter, you'll learn all of this:

  • How to build an app using windows and views, and understanding the differences between the two
  • Putting together a UI using all the common components, including TextFields, labels, and switches
  • Just how similar the Titanium components' properties are to CSS when it comes to formatting your UI

You can pick and choose techniques, concepts, and code from any recipe in this chapter to add to your own applications or, if you prefer, you can follow each recipe from beginning to end to put together a real-world app that calculates loan repayments, which we'll call LoanCalc from here on.

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

主站蜘蛛池模板: 道孚县| 玉田县| 醴陵市| 肥东县| 丰县| 乌拉特前旗| 清丰县| 钦州市| 内江市| 凯里市| 宁南县| 黄大仙区| 壶关县| 界首市| 双鸭山市| 依兰县| 永清县| 格尔木市| 子洲县| 镇原县| 蒙自县| 二连浩特市| 清原| 保亭| 察隅县| 北京市| 肇源县| 北碚区| 精河县| 泗洪县| 江阴市| 高唐县| 榆社县| 伊川县| 东阳市| 承德县| 东港市| 安徽省| 白山市| 社会| 冀州市|