Java/android tips for finishing a problem (2)

Source: Internet
Author: User

1, the property that modifies activity is theme, the property that decorates view is style, both XML format is same, only the statement that can function is different;

2, file implements the serializable interface, so it can be transmitted through intent;

3, Android, 1pt is probably equal to 2.22SP;

4, every application in Android running in its own process, have a DVM instance, and each DVM is a process in Linux, so the application--dvm--process can be considered the same concept;

5, through the Getmetrics () to get the screen properties, and then get the screen width high;

6, in the AVD virtual machine can be configured SD card, but can not configure Bluetooth;

7, you can set theme to set a activity into a window style, similar to dialog, will start its activity part occlusion;

8, the formal parameter can be considered as a local variable, because there is no pointer in Java;

9, i++ is also read first, then assign value, not atomic operation, need to synchronize. and I=1 direct assignment, is atomic operation;

10. When there is a return statement in Finally, it takes precedence and ignores possible return statements in the try and catch statements;

11. Convert the encoded format Statement str2 = new String (str, "GBK"). GetBytes ("UTF-8");

12, if the content of the StringBuffer is the same, they will point to the same address, stringbuffer modification will make another StringBuffer value also send a change. StringBuffer can not be assigned to it by the equal sign, append () and other methods, string strings concatenated, and actually used StringBuffer and converted back;

13. The Equals () method of the wrapper class (the first capitalized data type) does not handle data type conversions, that is, long a = new long (3); Integer b = new Integer (3); unequal compared with equals;

14, the array is not a native class;

Java/android tips for finishing a problem (2)

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.