In this article, we use SAX to parse XML. In Android, we can use SAX and DOM. DOM needs to read the entire XML file into the memory and parse it, which consumes a lot of memory. However, SAX is based on event-driven processing methods, callback
The last time we introduced the use of Activity and Intent, this time we will introduce Service. If Activity is compared to a foreground program, Service is a background program, and the entire life cycle of Service is only executed in the
Set Eclipse
1. Window> Customize Perspective
2. Select the Shortcuts label
3. Select Show View in Submenus.
4. Select Android in Shortcut Categories
5. Check LogCat on the right side and click OK.
6. Window> Show View>
Recently I wrote a mini game for android2.2. After I put it on google market, I found that some versions of Android 1.5 and Android 1.6 were downloaded. I put it on the simulator and found that none of them can be started. I checked the website
One problem mentioned in the previous article is that the sensor refresh frequency is too fast. If we want to create a UI, we need to draw a moving arrow Based on the direction data, the drawing interface needs to be refreshed too frequently,
AlphaAnimation controls gradient and transparent animation Effects
ScaleAnimation: controls the animation effect of size scaling
TranslateAnimation controls the animation effect of screen translation
RotateAnimation
I will introduce the
/*** Used to determine whether the service is running in the background* @ Param context* @ Param className the service name determined* @ Return true: false: not running*/Public static boolean isServiceRunning (Context mContext, String className
Web browsing and user interaction interface webViewThe WebView class is a view class at the java layer of the WebKit module. All Android applications that require Web browser functionality must create network resources for displaying and processing
[Java]AccelerometerListener: Sensor listening class. This class is used to listen to sensor accelerators and notifies clients of horizontal and gravity sensing information.ADNList extents ListActivity: Phone applicationBluetoothAtPhonebook:
Canvas. drawVertices is the common format of Canvas. drawBitmapMesh. For details about BitmapMesh, see Android ApiDemos example resolution (55): Graphics-> BitmapMesh.
Add a green mesh to the image to better display the drawVertices
In the previous example, the Android ApiDemos example resolution (61): Graphics-> Compass and the Android ApiDemos example resolution (79): Graphics-> SensorTest involves Sensors.
This example introduces the Sensors usage supported by
The Android Multimedia Framework supports obtaining and encoding multiple audio formats, so you can easily merge the audio into your application. If the device supports this, you can use MediaRecorder APIs for recording.
This chapter shows you how
An animation is usually defined by defining a key frame (first or last frame) and then the system automatically generates an intermediate frame. The process of generating an intermediate frame is called "interpolation interpolate ". Android
Android actually provides a simpler class ViewFlipper. ViewFlipper is both a subclass of FrameLayout and a subclass of ViewAnimator. Therefore, ViewFlipper and FrameLayout are similar in functions, however, it can automatically manage the switching
1. In addition to using files or SharedPreferences to store data, you can also choose to use the SQLite database to store data.
On the Android platform, an embedded relational database-SQLite is integrated. SQLite3 supports NULL, INTEGER, REAL
On google's page "Initializing a Build Environment"
I got this to install sun-java6-jdk, cause I have to compile android 4.0, and open-jdk cannot help me$ Sudo add-apt-repository "deb http://archive.canonical.com/lucid partner"$ Sudo apt-get update$
[Java]* Set the camera preview angle. You can directly use setDisplayOrientation for the camera preview angle above 2.2.** @ Param orientation: Camera preview Angle*/Private void setDisplayOrientation (int orientation ){Method
Animation can also be stored in an XML file, which improves the maintainability of the program. To write an animation in XML, follow these steps:
1. Create a folder named anim under the res folder
2. Create an xml file and add the set tag first.
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