上QQ阅读APP看书,第一时间看更新
Chapter 1. Stopwatch (with Lap Counter)
For our very first application, we will be building a standalone stopwatch. It will provide basic functions such as starting, pausing, and resetting. We will also provide the possibility of saving the lap time and displaying it in a list. This first example is pretty straightforward, but after going through the steps of building the application, we will be able to cover the different interactions between user interface (UI) elements (for buttons and display items) and data structures (for keeping tabs on our lap times).
By the end of this chapter, you will have learned the following concepts:
- Creating labels, buttons, and views
- Styling them and placing them on the screen
- Creating interactions between UI elements
- Creating a table view (that scrolls) and adding rows to it
- Using Titanium's logging API