Use of Android SQLite database (source code)

Source: Internet
Author: User

1.
2. This demo demonstrates how to use the android SQLite database and bind data to the listview.
3. demonstrate two ways to use databases, including transaction processing.
4. My platform is 2.2. You can run the project after getting it to eclipse, but pay attention to version matching.
5. this demo is suitable for beginners who are learning Android for less than a week. We strongly recommend that you manually repeat the Code , you must have learned a lot.
6. Learn the linearlayout layout and relativelayout layout.
7. Learn how to bind simpleadapter to data and display it on listview.
8. The author of the contact: QQ: 421271944 Email: shc111@yahoo.cn. If you have any questions, please contact me.
9. You must use this project to learn Unit Testing, debugging, and logging. You can try to modify a part of the code at. I think you will make great progress after understanding this demo.
10. I will upload this demo to Source Code on Google. You can download and learn it freely. (The upload and download of the donkey is too slow, so it will not be passed)
: http://code.google.com/p/sqlitedatabasetest/downloads/list

Note: Src-> com. Parabola. DB-> mainactivity1 is an example of using simplecursoradapter to bind a listview. Let's take a look.
res-> Layout-> mainandlistview. XML is another layout method.
COM. parabola. the test package is a test package, which uses androidjunittest for testing. Pay attention to test COM. parabola. service
COM. parabola. service-> otheruserservice: This is another method for database operations. You can compare the code carefully and check the API, Baidu or Google. Of course, you can also ask me.
This is a demo of my exercises, but there are many knowledge points involved. Therefore, we will send it for everyone to learn together. Knowledge points involved:
1. use of Android SQLite database and bind data to listview;
2. two database methods are used, including transaction processing.
3. learn the linearlayout layout, relativelayout layout, and UI controls.
4. learn how to bind simpleadapter (and simplecursoradapter) to data and display it on listview.
5. unit Testing, debugging, and logging

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.