Keywords:sqlite database , ListView, data adapter, content provider
SQLite Database : Sqliteopenhelper class; sqlitedatabase;
SQLITEOPENHELPER:A Helper class to manage database creation and version management.
Sqlitedatabase:exposes methods to manage a SQLite database.
The relationship between the two: Sqlitedatabase db = Helper.getwritabledatabase ();
Contentvalues: Adding and deleting the database is the data stored in the contentvalues;
Conmands: (SQL Statement implementation Additions and deletions)
Insert into account (Name,money) VALUES (string,string)
SELECT * FROM Account
Update account Set money = ' + ' where id= ' 1 '
Delete from account where id= ' 1
System API implementation and additions and changes
Db.insert (), Db.update () ...
Database transactions: Bank Transfer For example, let both sides change the value of the database at the same time to take effect
db.begintransaction (); Try { ... Db.settransactionsuccessful (); finally { db.endtransaction ();
ListView:
- Custom data adapters: Inherit the Baseadapeter class;
View view=view.inflate (mainactivity. thisnull);
Convert the XML file into a View object as a unit of the ListView.
- Arrayadapter:
- Simpleadapter:simpleadapter more complex points, the inside of the unit can have a variety of forms
content providers: to Be continued
Android Development (3)