The scattered knowledge points of Android learning

Source: Internet
Author: User

1.

Android Advertising platform: There are meters, wow, posture, admob (abroad, but the effect is not good), etc., recommended with rice

2.

The SRC directory is the source file directory, and all Java files that can be modified and created by the user will be stored in this directory

3.

Reference Strings.xml in XML

"@string/string_name"

In Java files

Activity.this.getString (R.string.resource_name)

4.

Content providers are primarily used for data sharing between different programs.

5.

It is best to use the OnPause () method to save the data that was changed before the user's interaction was stopped

6.

The Padding property is typically used to describe the relationship of the contents of a control to a control

Layout_margin are typically used to describe positional relationships between controls

7.

Gravity the alignment method used to set the text in the control

Layout_gravity used to set the alignment of a control in a parent control

8.

It's best to use an SP to describe text

Other with DP

9.

A picture is saved in the res/drawable/myimage.png location, which can be applied to a View in the Layout XML :

<imageview

android:layout_height= "Wrap_content"

Android:layout_width= "Wrap_content"

android:src= "@drawable/myimage"/>

The following code can be used to get a picture in drawable way:

Resources res = getresources ();

drawable drawable = res.getdrawable (r.drawable.myimage);

10.

The ID value.

11.

TextView How to display ellipses in multi-line situations.

Http://blog.sina.com.cn/s/blog_5eea5ce00101cugf.html

12.

<merge/> usage

Http://www.cnblogs.com/travelfromandroid/articles/2133206.html

The scattered knowledge points of Android learning

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.