Message mechanisms are mostly used for inter-thread communication and UI update.
Recently, I encountered an application scenario where I needed to update the UI by pressing the button. In this case, you only need to send a message by handler when
1. debug with log messages[Html]Private final String TAG = "TAG String ";Log. d (TAG, "This statement is executed ");
The Log class provides the following static methods to output various severe messages to Android system logs.
[Html]Log. e () //
Android provides a complete two-dimensional local graphics library in its android. graphics package. Including Color and Canvas graphics.
1. Color classThe color in Android is represented by four numbers. Transparency, Red, Green, and Blue (Alpha,
IOS-style UIS are popular. Many Android UI designers are also willing to design Android UI into a UI style similar to IOS. The following is an example to illustrate how to use Shape to define an IOS-style button.
Define an ios_button_grouped.xml
During Android development, you can always meet the Context class or its instances. Context instances are often used to provide reference for "Applications. For example, in the following code snippet, the first parameter of the Toast class accepts a
This topic describes several calendar controls on the Android platform.
As we all know, the calendar view control is added in Android 3.0 to display grid-like calendar content. For versions earlier than 3.0, the calendar control can only be used
To use Gallery in a recent project, the function of GridView must be available because of business needs. [Java]1. package com. easymorse. grid. demo;2.3. import java. util. ArrayList;4. import java. util. HashMap;5.6. import android. app.
When the phone call recording, photography, recorder, etc. all need to use the size of the T-card Hu judgment:[Java]Public static boolean isAvaiableSpace (int sizeMb ){If (android. OS. Environment. getExternalStorageState (). equals (android. OS.
When a program starts, the system creates a thread named main for the program. This thread is important because it is responsible for distributing events to appropriate user components, including plotting events. In addition, this thread is also the
The basics of the basic, the Code has a detailed explanation,
[Java] public class DrawingActivity extends Activity {/** Called when the activity is first created .*/@ OverridePublic void onCreate (Bundle savedInstanceState ){Super. onCreate
To record a set of login information, such as the login server, user name, password, and other information, it is very convenient to save and obtain the information using the preference.
Column:
[Java]EtUsername = (EditText) findViewById (R. id.
[Java] The effects written in xml can all be implemented using code. The following code is used to implement the switching effect of view States through code writing.The effects written in xml can all be implemented using code. The following code is
Proportional scaling of the image. The first parameter is the image path, and the second parameter is the maximum value of the final image (the largest value in width and height ).[Java] // The limit value MaxSize * (2/3) = the actual use value of
A Real-time folder is a desktop component used to display data information provided by a ContentProvider. To create a real-time folder, you must have two support options. On the one hand, you need to define an Activity for creating real-time folders.
[SQL] // Set the column headers to show in the toolSqlite>. headers on // Select all rows from a tableSelect * from table1; // Count the number of rows in a tableSelect count (*) from table1; // Select a specific set of columnsSelect col1, col2 from
Previous Android RoboGuice User Guide (1): describes the basic usage of robot Guice. Roboguice is a Dependency Injection development kit developed by Android and Google Guice, the basic flowchart for developing applications using
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