Join Rafael Hernandez for an in-depth discussion in this video Adding interactivity to any view, part of Titanium Mobile App Development Essential Training.
- View Offline
- Exercise Files
You may have noticed in working with the Titanium Mobile documentation that any…view can fire events to be listened to.…Probably the most common event to listen for is a click event, really a tap.…Just as we did with simple and custom buttons, we can broadcast view events…and act on them easily through the addition of an EventListener on the view in question.…Starting the app.js file, I've created a new window object with a view that…contains an image and a label view, and a separate label view called results…that is added to the window object.…
I'll add EventListeners to the window object, the view object, and the views…within the view object.…The image, label, and view objects will listen for the touchend event.…For callback function, I'll create a method called touchHandler that they'll all share.…The touchHandler function will set the text property of the results label view…to a string that consists of the ID property of the object that fired the event…and the text was tapped.…
The window object will listen for the touchMove event and call the…
- Accessing the Titanium API documentation
- Navigating the Titanium Studio workspace
- Detecting platforms
- Understanding windows and views
- Listening for events
- Configuring text fields
- Adding interactivity to a view
- Working with a single tab group
- Creating a map and setting the location
- Adding and removing map pins at runtime
- Loading local and remote web pages
- Loading an external XML feed
- Setting timers
- Prompting device vibrations
- Implementing an activity indicator
- Reading from and writing to the file system
- Working with media
- Reading device orientation
- Detecting gestures
- Debugging an app
- Stepping through a finished app
Skill Level Beginner
1. Getting Started
Editing run configurations1m 38s
2. Windows & Views
3. Controls, Input & Interactivity
4. Tab Group
5. Table View
6. Map View
7. Web View and XHR
9. Data Management
Sending an email3m 38s
Reading device orientation2m 27s
12. Preparing for app distribution
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.