The Android framework provides two animation systems: Property animation (introduced in Android3.0) and view animation. These two animation systems are both feasible options, but attribute animation is usually the preferred method because it is more
The Intents sample code is very simple:
[Java]Intent intent = new Intent (Intent. ACTION_GET_CONTENT );Intent. setType ("audio /*");StartActivity (Intent. createChooser (intent, "Select music "));Intent intent = new Intent (Intent.
Similar to the Service in Windows, the Android System also provides a component called "Service" that runs normally in the background. An Activity can be used to start a Service. After the Service is started, it can always run in the background,
Normally, if the Android app encounters an unhandled exception, a dialog box similar to the following will appear, and then force the app to exit:
If you want to change this default behavior, such as displaying a custom dialog box when an
I recently reviewed my notes and found that AsyncTask was not very easy to understand. I had to look for some information on the Internet, so I did not dare to share it with you here.
Here there are two ways to explain, each with a focus:
The first
Five and nine1. Do not copy the uidesign on other platforms. It should make users feel like they are using a real Android software, balancing your brand display and overall platform view.
2. Do not over-use the modal progress bar and confirmation
Recently, I have been studying operations on video rotation in android programming, but I still haven't completed the goal: to rotate the video 90 degrees in a small area of a small area on a certain page.
The methods are as follows:
1. Rotate a
I. Text message sharing
01Intent intent = new Intent (Intent. ACTION_SEND );02// Intent. setType ("text/plain"); // plain text03// Share images04Intent. setType ("image/png ");05// Add an image06File f = new File ("/sdcard/sd.png ");07Uri u = Uri.
1. adb connects to targetAdb kill-serverAdb connect target-ipAdb shell
2. Switch to the database file directoryCd/data/com. android. providers. settings/databases
3. Use sqlite3 to connect to this data fileSqlite3 settings. db
4. Insert proxy
RoboGuice recently released version 2.0. Compared with 1.1:
Improved StabilityFragment supportedSimpler and easier to useHowever, because RoboGuice2 is not fully backward compatible with RoboGuice1.1, it is necessary to modify the code for the
Canvas provides drawArc to draw an arc.
Public void drawArc (RectF oval, float startAngle, float sweepAngle, boolean useCenter, Paint)
Oval: Specifies the rectangular area of the outer contour of the arc.StartAngle: the starting angle of the arc,
Android movies can be dragged to any positionThe code for the Activity is as follows:
01Public class DraftTest extends Activity {02/** Called when the activity is first created .*/03@ Override04Public void onCreate (Bundle savedInstanceState
In this example, SensorManager is used, preferably on a mobile phone.
SensorManager is used to manage various sensors in Android devices. The method for obtaining the SensorManager instance object is to use getSystemService:
[Java]Private
Canvas provides drawText and drawPostText to display text on the screen. The font type and size are defined by setting the paint attribute.
Painting also provides the size (width, height, range, etc.) occupied by the text on the screen when the text
Even if your application is fast and responsive, some designs still pose problems to users-unexpected data loss due to unplanned interaction with other applications or dialogs, unexpected blocking and so on. Avoiding these problems helps you
Handler Content summary:
/**
* Handler can distribute the Message object and Runnable object to the main thread. Each Handler instance is bound to the thread that creates the handler (generally located in the main thread). It has two functions: (1):
Environment: When the options in the list are not selected, the button font in the title bar is gray and cannot be clicked. When the options in the list are selected, the button font in the title bar is normal and you can click
Implementation:
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.