Android-Personal Financial Management System (SQLite + PS)

Source: Internet
Author: User

I have learned about the database over the past few days and found that the sqliteopenhelper class is quite good. Pay attention to the following points:

1. This is an abstract class. You must write a class to inherit it;

2. This class must be written into the constructor;

3. The oncreate function is called only when the database is created for the first time !!!! I wrote the statement for creating a table in this function. Later I want to change the table, but I just changed the code .. It cannot be changed !! It took a long time !! I added the log statement here and found that it was not executed at all. Then I created another database .. I think so too. If a database is created, there is also content. How can I easily change the header? Will not match... So the call of the oncreate function is still learned...

4. The ADB version must be the same as the SDK version. when running the ADB shell, make sure that the simulator is on or the mobile phone is plugged in. Otherwise, the device cannot be found .. At the beginning, my project was 2.3.3, And the 2.2 AVD was created and could not be run. Therefore, 2.2 of the project was created (because my SDK is 2.2 )..


It is quite simple to compile the personal financial management system with the basic database, and the main effort is all spent on the PS and interface layout .. This time, we mainly use relative layout .. The following are some of the problems you have encountered:

1. PS is a headache. It takes most of the time to make a few texts. online tutorials are very detailed, but parameters may differ, you cannot simply follow the online tutorials and have your own innovations and aesthetics. The stroke path has been searched for a long time. After creating a work path, you need to draw an edge in the new layer. Because it was the first time I used PS, I was not very familiar with it. Many things had to be operated by selecting the tools and layers first. Otherwise, they would be unavailable in gray.

2. An error occurred while adding the background in XML. Later, I created a drawable folder and put all the images in this folder. I don't know why, but I may reference it incorrectly, always say resource not found or something .. In addition, when converting a PS exported JPG file to PNG file, the file extension is directly changed. In fact, the file cannot be converted or referenced, and the system prompts that the file is not PNG, later, I opened it and saved it as a drawing tool.

3. Use imagebutton when adding images to the button. Because of the habit of using the button, use the imagebutton obtained by the button through ID in the main program. There is no compilation error, but it will be forced to exit.

4. layout_marginleft and layout_below are mainly used in the relative layout. It is still a little difficult to adjust and waste a lot of time.

5. When color is used, it is combined with PS (that is, # What is the value following ~) Declare several nice colors in color. xml.

6. Currently, I still don't know how to use ADB shell when running a real mobile phone. It seems that only AVD can be used ..

7. When I insert data, I Don't Know How To directly getwritabledatabase .. Then, getreadabledatabase is used, and then the value is assigned again .. It's too late today .. Take a look ..

8. Why does the mobile phone and AVD display differently .. It indicates that the simulator I used for mobile phone adjustment is ugly, and I have to switch back and forth between the two methods, because ADB cannot be used for mobile phones .. So helpless ..


The following two interfaces are uploaded. This time, PS takes a lot of time...






PS: (it's really ps ~) Attach a small button ~ I learned PS for the first time .. It's really complicated .. It took a lot of effort .. The button is actually a cute Cream Chocolate ~ I didn't expect it to become smaller .. It seems that, considering the application of mobile phones, buttons are not necessary to be too precise ~

(The legendary crystal effect ...)


(The legendary Cream Chocolate effect ...)

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.