Find bugs and eliminate series--record bugs encountered in Android development (II)

Source: Internet
Author: User

Bug 1:bug Description:

    Failed to successfully pass content from EditText to the database

Bug action diagram:

  

After:

 Recently wrote a project to use to SQL database, because there is no knowledge, is to find a variety of information to start a self-study tour, in the demo test can, however, the porting to the actual project is a failure, pop-up application has stopped the error prompt, spent two weeks, compare data, once the attempt, have been looking for bugs.

Finally, Kung Fu is not a conscientious, finally was I found, the original is edittext in the empty, my project is to get edittext input content, and will get the content into the specified database, because of the test, then I did not Fill in all the EditText, and then get the empty content into the database, there is an error

Solution Ideas:

  Set the default value of the EditText, when the user does not need to enter the time, you can skip the edittext do not need to enter, at this time, get to the user did not enter the Editext content is the default value we set , so that the incoming database is not empty, It avoids the mistakes that occurred before.

Bug 1:bug Description:

    Drawlayout slide out of the lag

Bug Action diagram:

  

  

After:

 When doing the project, the use of the official Android side-slip interface drawlayout, but, but found very lag, carefully studied some, found the problem, the original is I set the head of the picture is too big, 1920x1080 pictures, load consumption of too much time , so it looks like a motion picture.

Solution Ideas:

  Since it is a large picture, it is natural to change the size of the picture is good, see here, you have an idea--compress the picture

However, compressing the picture does not solve the problem because you do not change the resolution of the picture itself .

I directly use Photoshop to create a new 580*340 image, then the original copy of the image, then export, set, test, OK, line, of course, other resolutions are estimated also line, as long as not too big, interested readers can go directly to research!!

Find bugs and eliminate series--record bugs encountered in Android development (II)

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.