Android Programming Summary (1)

Source: Internet
Author: User

1. Display the prompt message dialog box through Toast class

Toast.maketext (login.this, "Please input the right infomation!", Toast.length_long). The show () function is implemented.

2,  android qt qstring android string qt qstring Gets a string with double quotes.

3, Android inputstream and fileinputstream Contact and difference:

InputStream myfile=new Bufferinputstream (New FileInputStream (New File ("C:\\erer.txt"));

4, becausesharedpreferencesbehind is the useXMLfile to save data,getsharedpreferences (Name,mode)The first parameter of the method specifies the name of the file, without a suffix, and the suffix isAndroidautomatically added. The second parameter of the method specifies the mode of operation of the file, with a total of four modes of operation. If you want tosharedpreferencesbehind the use ofXMLfiles can be read and written by other applications, you can specifycontext.mode_world_readableand thecontext.mode_world_writeablepermissions. But in fact the use ofmode_world_writeablepermissions, other applications cannot modify the data of this program ..If other programs want to modify this program data can be used in the configuration fileAndroid:shareduserid, plusShareduseridthen, when you write files to other programs, the permissions do not matter

5, MkDir() creates the directory specified by this abstract path name (and only one level of directory is created, and the parent directory is required); mkdirs() creates the directory specified by this abstract path, including all parent directories that must but not exist. (And you can create a multi-level directory, regardless of whether the parent directory exists)

6, Java Chinese Code reference URL:

http://www.ibm.com/developerworks/cn/java/j-lo-chinesecoding/

7, Advanced Video codec http://hexdigi.jimdo.com/2011/07/26/mpeg-h264-wmvhd-rmvb/

8. Java static method http://www.cnblogs.com/panjun-Donet/archive/2010/08/10/1796209.html

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.