Pointer
The pointer is reflected to /GEN/package/name/scriptc_renderscript_filename. You can declare a pointer to a struct or any other type supported by renderscript, but the struct cannot contain pointers or nested arrays. For example, if you
Work with memory
Non-static and global variables declared in renderscript will be allocated memory during compilation. In renderscriptCodeYou can directly use these variables to work without allocating memory to them at the android framework layer.
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
When using the initloader () method, if the loader with the specified ID exists, use the existing loader. Otherwise, a new loader is created. However, sometimes you want to discard the old data and restart the loader.
You can use restartloader ()
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
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
The ability to add, delete, replace, and use fragment in an activity to respond to user interaction is a great feature. Each change set you submit to the activity is called a transaction, and you can use APIs in fragmenttransaction to execute it.
Read and Write global variables
Reading and Writing global variables is a simple process. You can use the accessors method on the android framework layer or directly set them on the renderscript code layer. Remember any changes in the renderscript
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
This article translated from: http://developer.android.com/training/basics/intents/filters.html
The previous two lessons have been focusing on one side of the story: Start the activity of another application from your application. However, if your
This article translated from: http://developer.android.com/guide/topics/graphics/opengl.html#compatibility
OpenGL version and device compatibility
Android system supports OpenGL since 1.0Es 1.0 and 1.1 specifications, starting from android2.2 (API
An application usually contains multiple activities. Each activity should be designed around the specific action types that a user can execute and be able to start other activities. For example, an email application may have an activity used to
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
Find a device
You can use the descrithadapter object to locate a remote Bluetooth device by discovering or querying the list of paired devices.
Device discovery is a scanning process that searches for available Bluetooth devices in the local area,
This article translated from: http://developer.android.com/guide/topics/sensors/sensors_environment.html#sensors-using-humid
The Android platform provides four sensors that monitor various environmental attributes. These sensors can be used to
Enable device discoverability
To make the local device accessible to other devices, call the startactivityforresult (intent, INT) method of the action_request_discoverable operation intent. This method sends a request to the system settings to
This article translated from: http://developer.android.com/guide/topics/data/install-location.html
From API Level 8, you can allow your applications to be installed on External Storage (such as the device's SD card ). This is an optional feature.
Applications that should not be installed on External Storage
When a user enables USB memory to share files with a computer (or detaches or removes external memory), any application installed on the external memory that is currently running will be
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