Udacity android Study Notes: lesson 4 part a, udacityandroid
Udacity android Study Notes: lesson 4 part
Prepared by: Taobao stores/titer1/Archimedes
Source: https://code.csdn.net/titer1
Contact: September 1307316
Statement: This article uses the following agreement for authorization: Free Reprint-non commercial-Non derivative-keep the signature | Creative Commons BY-NC-ND 3.0, reprint please indicate the author and the source.
Tips: https://code.csdn.net/titer1/pat_aha/blob/master/Markdown/android/
SQL lesson
Started from class 4a-15, mainly the basic activity life cycle
The SQL table looks like this.
Overview arch repetition
lesson 4a 18
Intro to weather contract
See also solution weather table colums solutions
Inner join 2 tables
Rest Time
Don ask new scholars to learn more about the key points of foreign key and joins (in lesson 4a-23)
Our weather contact
Practice .. Code time weatherContract. java
Don details the key/foreign key
Define constants in contract
LocationEntry
Chapter 2 sqllite open helper and sunshine database
WeatherDbHelper code
-Database Name
-Database-related statements
-Create table
-Specify a foreign key
Database Test
The result is not passed.
The general reason is that only weather. db has been created and locatin. db has not been created.
Next to modify
The following is to make up for the remaining db,
Create sunshine location DB solution
Sqlite open helper on Upgrade
Database upgraded
-Must I manually change the database version number?
-Database changes
-Row changes
-Column change
-Overall Structure Change
- When will it be executed?
Chapter 3 readwrite from a database3.1 overview
3.2 plan
3.3 difficult query
3.4 code practices
The code in Chapter 3 is concentrated here
The key is to execute the previous checklist and write testLocationTable.
The same principle is used to test weathertable. OK, let go
End
It took two hours. Thank you, don.
-Data storage dimo-overview
-Activity lifecycle: changes when the screen is rotated (pause... restart ?)
-Database test