Adroid provides developers with a development platform to build rich and novel applications.ProgramCapabilities. Developers can freely use hardware devices, access local information, run background services, Set alarms, and add notifications on the
It is the default action of the system to retain the activity status when the activity is terminated. In this way, when the user returns to the previous activity, the user interface will display the way they left. However, in the scenario where the
To manage fragment in an activity, you need to use the fragmentmanager object. You can obtain this object by calling the getfragmentmanager () method in the activity.
The fragmentmanager object can do the following:
1. Get the existing fragment in
1. inheritance relationship
Java. Lang. Object
| _____ Android. OS. Message
Implement the parcelable interface.
2. class overview
This class defines a message that can be sent to the handler object. It contains the Message description and any data
1. inheritance relationship
Java. Lang. Object
| _____ Android. widget. Toast
2. class overview
A toast is a window that contains short messages to remind users. The toast class will help you create and display this window.
When this window is
When the activity receives the focus, it will request to describe its layout. The android framework will deal with this plotting process, but the activity must provide its layout hierarchy and nodes.
It starts from the root node of the layout. It
Style attributes
After understanding how a style is defined, you need to learn that elements define valid style attribute types. You may already be familiar with layout_width and textcolor attributes, but there are more style attributes that can be
Public void settargetfragment (fragment, int requestcode)
This method sets an optional target for this fragment object. For example, if this fragment object is started by another fragment object and you want to return a given result to the first
A started service must manage its own lifecycle. That is to say, unless the system needs to recycle the system memory, the system will not terminate or destroy this service. After the onstartcommand () method returns, this service will continue to
The android backup service is integrated into the android data backup framework. It is used to back up and restore data on most devices running Android or later. In some cases, the specific Android device may contain different backup transmitters
This article translated from: http://developer.android.com/guide/topics/renderscript/advanced.html
Because the application using renderscript still runs inside the android Virtual Machine (VM), you can access all the framework APIs you are familiar
Put data into the database
You can import the contentvalues object into the instert () method to insert data into the database:
// Gets the data repository in write modeSqlitedatabase DB = mdbhelper. getwritabledatabase (); // Create a new map of
This article translated from: http://developer.android.com/training/basics/intents/sending.html
One of the important features of Android is to bring users into another application based on the specific "action" to be executed. For example, if your
Verify that there is an application to receive intent objects
Although the Android platform ensures that the determined intent object will be received by the built-in applications (such as phone, email, calendar, and other applications), before
Call renderscript code
You can use _Script_nameCreates an renderscript object and calls renderscript from the android framework code. This class contains a foreach_root () method, which calls the rsforeach () method. You can pass it the same
Use viewpropertyanimator to create an animation
The viewpropertyanimator class uses a single animator object to provide a simple method for parallel processing of several animation attributes of a view object. Its behavior is very similar to the
Use valueanimator to create an animation
The valueanimator class specifies certain types of animation values during animation playback by setting int, float, or color values during the animation process. Obtain a valueanimator object through a
The loader function is introduced in android3.0, which makes it easy to load data asynchronously in activity or fragment. The loader has the following features:
1. The loader is valid for every activity and fagment;
2. The loader provides the
Public void oncreatecontextmenu (contextmenu menu, view V, contextmenu. contextmenuinfo menuinfo)
This method is called when the context menu of the view object is displayed. Unlike oncreateoptionmenu (menu, menuinflater), this method is called
This article translated from: http://developer.android.com/training/sharing/receive.html
Just as your application can send data to other applications, it can easily receive data from other applications. When receiving data from other applications,
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