Runnable is not necessarily a new thread. For example, the following call method is run in the main UI thread:
Handler mhandler =NewHandler (); mhandler. Post (NewRunnable () {@ overridePublic VoidRun (){// Todo auto-generated method stub}});
Problem 1. When running the activity, the your content must have a tabhost whose ID attribute is 'android. R. Id. tabhost'When layout is added, tabhost is selected for the XML and element, but the ID attribute is not added for the ADT. when running
The new calendar View Control in Android 3.0 displays the grid-like calendar content. Android. widget. calendarview is inherited from Android. widget. framelayout.
The calendarview class provides the basic calendar setting method,
Long getdate ()
When we use asynctask in Android, it is generally used as the internal class of the activity. In this way, you can simply update the progress onprogressupdate and onpostexecute when the execution is complete, and directly operate the interface
There are two ways to start that acitivity: Implicit (hidden) intent and explicit (explicit) Intent
Explicit intent
Specify the acitivity to be startedFor example, the following Java code explicitly specifies that B is to be started:Intent intent =
In Android, The inputtype attribute plays an important role in the style of the virtual keyboard started when the edittext value is input. This greatly facilitates operations. Sometimes the virtual keyboard is only a character or a number. Therefore,
No matter what the application is, the configuration interface is indispensable. You can modify at least some parameters.Entry 1,
The configuration interface of Android is preferenceactivity,
Http://www.cnblogs.com/wservices/archive/2010/07/08/1773
Images downloaded may vary in size and resolution. How can I display them on a smartphone?
A specialist wants to write a method to automatically convert the image size and resolution based on the screen size. Is it necessary to write this algorithm?
Some Java classes in the android SDK are open, some are not open, and the same is true for APIs. The so-called open classes or APIs here are only the scope of javadoc, and are not public and private in Java. That is to say, it doesn't matter for
Full ScreenAdd the following code before calling setcontentview (myview) in the oncreate method of activity.Requestwindowfeature (window. feature_no_title); // hide the titleGetwindow (). setflags (windowmanager. layoutparams. flag_fullscreen,
In the previous section, we used DOM to parse XML documents. This method conforms to our daily thinking and is easy to use. However, it directly transfers documents to the memory, which is relatively memory-consuming. Here we can use another method
+ ------------------------------------------------- +
+ This series is serialized and occasionally updated. +
+ ------------------------------------------------- +
1. Download and compile the android4.0 System
For details about downloading and
In today's project, the dialog box floating-layer display is used. This function can be implemented by popupwindow. You can customize the view and use the layoutinflator method to load the custom layout. In addition, you can customize the animation
Changes to the platform version will introduce new features and optimize existing APIs.
For new features of Android 4.1 (jellybean), please refer to the official documentation Android-4.1. Because this article does not focus on introducing the new
There are three important concepts:
1. Logoff
The default working thread is a message loop that is not associated with it. You can use the logoff class to run the message loop. After entering the message loop, the message loop will process the
This article mainly introduces how to achieve the 3D Rotation effect of the view. The main principle is to rotate around the Y axis, and there is an in-depth zooming in the Z axis.
The demo has the following highlights:
1. Custom rotation Animation
2
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