Android practical programming skills code summary

This paper summarizes the practical programming skills of Android. Share with you for your reference, as follows:

1. Make a picture transparent:

2. Direct mail:

3. Program control screen lights up:

4. Filter specific text

5. Scrollview scroll stop event

6. Initiate an association for a specific program to open

For the inapplicable index format on the top of the picture, an error will occur.

7. Set text appearance

8. Set a separate initiation mode:

9. Create a fillet image

The main principle of this is to create a rounded box by using the mask, and then place the picture below:

10. Add a number to the icon on the notification to indicate how many are unread

11. Background gradient:

First create the file drawable / shape xml

Set the start color, end color, and angle of the gradient in this file

Then create a theme values / style xml

Then at androidmanifest This topic is introduced into the application or activity in the XML file, such as:

This method also applies to controls

12. Store data when you save static data in an instance, after the example is closed, the next instance will be null if it wants to reference static data. Here, you must override the application

More readers interested in Android related content can view the special topics of this site: introduction and advanced tutorial of Android development, summary of Android view skills, summary of Android layout skills, summary of Android debugging skills and solutions to common problems, summary of Android multimedia operation skills (audio, video, recording, etc.) Usage Summary of Android basic components and Android controls

I hope this article will help you in Android programming.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>