Android plug-in currently has a lot of open source projects in China, but if not actually developed once, it is difficult to master very well.
The following is their own starting from 0, combined with the current open source projects and blogs,
Some users will find activity in the switch to the background or layout from the horizontal screen landscape switch to portrait, will switch activity will trigger a OnCreate method, We can add this attribute android:configchanges=
How to determine whether the system is currently in flight mode in Android:
Copy Code code as follows:
public static Boolean Isairmodeon (context context) {
Return (Context.getcontentresolver (), Settings.System.getInt (),
Recently has been calling the micro-letter API, but found that the call has been unsuccessful, tangled up for a long time, all aspects of finding tutorials, find the official, the official documents are only very vague, said to be three steps away.
I'm a piece of cake. Currently saw two kinds of pop-up box implementation, the first is the most common Popupwindow, the second is the activity of the way is a few days ago. Feel very domineering oh. Unexpectedly, activity can also be a pseudo
I. Basic Concepts
Save a file in an Android application and save it in two places
① mobile phone with the storage space, small (such as 200M), suitable for saving some small files, Android save location in the data/data/application package
Get the picture from a photo or photo album, crop it, and then display the picture on the ImageView. Of course can also upload to the server (most of the project is uploaded to the server), referring to the online data and combined with the
A singleton pattern is the most common and simplest design pattern in a design pattern, ensuring that only one instance of the program exists and can be accessed globally. For instance, the account information object management used in the Android
In HTML, we all know what the layout means, in simple terms, the page is divided into modules, such as the HTML Div, table and so on. So is the case with Android. The Android five layout makes the interface more beautiful and more convenient to
The type of event in Android is divided into key events and screen-touching events, and touch events are the underlying events of screen-touching events, and it is necessary to have a thorough understanding of them.
One of the simplest screen touch
Realize the idea:
This view is implemented through ListView, showing each listitem with content and time of the entity two fields
The timeline is assembled using a line (20DP) above and a middle circle (15DP) and a line (40DP) below.
In ListView,
Split () Split string
1. Distinctions in different contexts
Java: Split string cannot be written as split ("$")//$ for characters to be split
Android: Split strings need to be added with bracket split ("[$]")//$ for characters to be split
2.
First look at the general way to hide the status bar:
Method One:
@Override
protected void onCreate (Bundle savedinstancestate) {
super.oncreate (savedinstancestate);
Remove TITLE
requestwindowfeature (window.feature_no_title);
Remove the
Neon is used to depict the contours of the image, to outline the edge of the color change, to enhance its excessive effect, so that the image produced contour luminous effect.The main steps are
1, according to the current pixel and its right and
Android UI Update
People who have done Android development have been confronted with the problem that as the requirements change, some of the portal interfaces will be subject to changes in UI, content, and jump interface, and there are several
"One" common usage
The most original usage, the coupling degree is low, but cannot unify the management. We need to write the following code in each controller, very cumbersome, after the project to modify more cumbersome, a controller to a
SharedpreferencesIt is used to provide the software parameter setting when the software is developed, the XML file is used to store the data, and the file is stored in the/data/data//shared_prefs directory;
Copy Code code as follows:
Products in the test process found a bug, is the tester constantly crazy click on a button, triggered the toast, toast content will always line up the display, not quickly disappear. This may affect the user's use.
See Toast has a Cancel () method:
There are several ways to get system time in Android, which can be divided into Java Calendar class acquisition, Java.util.date class implementation, and Android.
The summary is as follows:
Method One:
void GetTime1 () {
long
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