This chapter mainly introduces Android Application resources. Android Application resources are an excellent and highly decoupled design. By using resource files, android applications can hand over various strings, images, colors, and interface la s
In Android, many times the format of the system's native controls does not meet our needs. We want better styles, such as rounded rectangle and color gradient, shadow effect, etc. This is the time when our ShapeDrawable works out. Let's take a look
Package cn.com; import java. io. file; import java. io. fileFilter; import java. util. arrayList; import java. util. list; // Problem description: count the number of files that meet the conditions in a folder // 1 use FileFilter to filter out files
In the previous article, we learned how to use ActionSheet. Careful friends may find that the format for creating a list is HTML. The Code is as follows:
function showCustomHtmlSheet() { $("#afui").actionsheet('BackShow Alert 3Show Alert
Problem Background: The previous JNI programming is based on Android NDK tools. The so file is generated for android to call. For details, refer: the current goal of the http://blog.csdn.net/yanzi1225627/article/details/8525720 is to use eclipse CDT
1. Background:
To facilitate debugging, you often want to start the apk directly by knowing the path of the apk, so you have written this command.
2. Usage:
Adb push launch/data/
Adb push launch. jar/data/
Adb shell
Launch
You can also put the jar
Reference http://developer.android.com/sdk/installing/studio.html
The main differences between Android Studio and Eclipse are:Gradle-based build support.
Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging
Android Pull-to-refresh animation implementation
Currently, many applications use the pull-to-refresh animation effects, including Weibo, QQ, and so on.
Here, the implementation of the pull-to-refresh animation effect is illustrated with examples,
There is always a saying in the Android industry that you want to learn about Service, so you have to write a music player.Why Service?
Services are running behind the scenes, and they are not easy to see, but coincidentally, music is just invisible
Next, let's take a look at the JNI compilation process and calling process, as shown in: (for details, see the shared JNI book. This is a graph on windows, which contains helloworld. dll will become helloworld in linux. so)
VcD4KPHA + 1rtq0ln9
I. Basic Knowledge
Android event processing is divided into three steps.
1) public booleandispatchTouchEvent (MotionEvent ev) is used to distribute TouchEvent2) public boolean onInterceptTouchEvent (MotionEvent ev) This method is used to intercept
Google banned network access in the main thread after the 4.0 system because:
The main thread is responsible for the UI response. If network access is performed on the main thread, force shutdown is triggered for more than 5 seconds. Therefore, such
Body
If you encounter problems related to the Shutdown Alarm, the most effective log is to use the mobile log tool on your mobile phone to capture logs. The shutdown alarm is designed to enable the alarm interface and the alarm tone only
Parsing XML files is a very common function. In Android clients, xml files are often required for communication with servers.
A simple xml file is parsed using the pull method in android. In java, dom parsing and sax parsing are available. This pull
Summary:
We use the delta encoding algorithm to reduce the size of the Android app Upgrade Program. We use bsdiff and bspatch tools to implement the delta Encoding Algorithm on android. The server software and android application have been deployed.
UI-related problems (incorrect image, spent image, no image, black screen, white screen, or floral screen) are difficult to locate through ordinary mobile log. layer dump, window log, and view system log must be used for analysis.
Note:
4. Linux Suspend Process
The file path is android4.0/kernel/power/
Next, let's take a detailed look at how Linux sleeps/wakes up:
(1) The user reads/writes/sys/power/state and calls the main. state_store () in c. You can write strings defined in
For Android applications, we often need to determine the user's operation on the Return key. Generally, to prevent misoperation, the user is prompted whether to exit the application when the user presses the return key twice in a row.
The basic
Steps for using Camera to take a photo:
1. Call open () of Camera to open the Camera.
2. Call getParameters () of Camera to obtain the Camera parameters. This method returns a Camera. Paremeters object.
3. Call the Camera. Parameters object method
1. Create an Android Project File-> New-> Android Application Project 2. Define the java class that calls the C function and generate it (automatically compiled in Eclipse ). Java code: package lw. example. hellondk; public class HelloJni {public
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