Join Rafael Hernandez for an in-depth discussion in this video Adding rows, part of Titanium Mobile App Development Essential Training.
- View Offline
- Exercise Files
At some point you'll need to add or insert rows into your tableView.…Starting with the app.js file in the 05_06 folder of the exercise files, I'm…using the finished state of exercise 05_02.…I'll code an EventListener for the tableView that will append a new row at the…end of the table when any row is clicked.…For the callback function I'll create a new tableView row with the title…property set to Row added.…
Then I'll call the appendRow method of the tableView with the newly created…row as the argument.…Let's take a look at the result in the Simulator.…As I click rows, new ones are added to the end of the tableView.…This even happens if I click the newly created tableView rows.…This is because the EventListener is attached to the tableView and there's no…further filtering via code with the callback function.…
Now I'll modify the callback to insert rows after the third row,…California Hotsprings.…I'll comment out line 42, then I'll call the insert row after method of the…tableView, and feed is the first argument - The index of the row to insert after.…
- 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.