Android Programming The Big Nerd Ranch Guide, 3rd Edition
Gutting CrimeLab 277 Gutting CrimeLab Now that you have a database, your next step is to change a lot of code inside of CrimeLab ...
Chapter 14 SQLite Databases 278 Writing to the Database The first step in using your SQLiteDatabase is to write data to it. You ...
Inserting and updating rows 279 Inserting and updating rows Now that you have a ContentValues, it is time to add rows to the dat ...
Chapter 14 SQLite Databases 280 You may be wondering why you are not putting uuidString directly into the where clause. That wo ...
Reading from the Database 281 Reading from the Database Reading in data from SQLite is done using the query(...) method. SQLiteD ...
Chapter 14 SQLite Databases 282 Using a CursorWrapper A Cursor leaves a lot to be desired as a way to look at a table. All it d ...
Using a CursorWrapper 283 You will need to return a Crime with an appropriate UUID from this method. Add another constructor to ...
Chapter 14 SQLite Databases 284 Converting to model objects With CrimeCursorWrapper, vending out a List from CrimeLab will be s ...
Converting to model objects 285 The last important thing to do is to call close() on your Cursor. This bit of housekeeping is im ...
Chapter 14 SQLite Databases 286 Refreshing model data You are not quite done. Your crimes are persistently stored to the databa ...
For the More Curious: More Databases 287 This is also a good time to test that calls to updateCrime(Crime) in CrimeFragment work ...
Chapter 14 SQLite Databases 288 For the More Curious: The Application Context Earlier in this chapter, you used the application ...
289 15. Implicit Intents In Android, you can start an activity in another application on the device using an implicit intent. In ...
Chapter 15 Implicit Intents 290 Before you can create these implicit intents, there is some setup to do in CriminalIntent: add ...
Adding a Suspect to the Model Layer 291 Adding a Suspect to the Model Layer Next, open Crime.java and add a new member variable ...
Chapter 15 Implicit Intents 292 Add the column in CrimeBaseHelper, also. (Notice that the new code begins with a quotation mark ...
Using a Format String 293 If CriminalIntent is already installed on your device, your existing database will not have the suspec ...
Chapter 15 Implicit Intents 294 In CrimeFragment.java, add a method that creates four strings and then pieces them together and ...
Parts of an implicit intent 295 Parts of an implicit intent Here are the critical parts of an intent that you can use to define ...
Chapter 15 Implicit Intents 296 To respond to implicit intents, a DEFAULT category must be set explicitly in an intent filter. ...
«
11
12
13
14
15
16
17
18
19
20
»
Free download pdf