Http://www.cnblogs.com/supersugar/archive/2011/08/02/2125450.html
If you want to set the view background, but there is only one small image, it will be stretched when it is directly set to background. To use the tile mode, follow these steps:
Android style and topic
Android XML style and topic file writing are one of the factors that affect the beautiful UI of the entire program. When designing an application, you can use styles and themes to format various screen and UI elements in a
Imageview. scaletype | Android: the significance of scaletype:
Imageview. scaletype. Center | Android: scaletype = "center" is based on the geometric center of the source image and the geometric center of the imagview,Centered by the original size
I. Differences between click events and touch events:
Click Event: For a button, the system responds to both the button and the touch screen event;
Touch event: For a button, only the touch screen event is returned;
Therefore, we recommend that
When creating a new control or modifying an existing control, we will all involve rewriting the ondraw method of the control or view.
The ondraw method will pass in a canvas object, which is the canvas you use to draw the visual interface of the
The style of the label bar at the bottom of the iPhone is now popular on the Internet. How can this be achieved in Android? I have seen several articles on the Internet, one of which is of reference value, but the method is not too simple. Because
Textview's built-in drive lamp effect will be ineffective when the focus is lost. The company just needs this effect. Even if the focus of the drive lamp is lost, what should we do? There are a lot of messy code on the Internet, which is so
1. Modification
1. Let's talk about a simple modification. There is a menu in the native machine, which can be used for speaker, mute, and hanging up functions, however, the menu itself has a feature that the menu disappears after you click the
Android real machine installation simulator devtools development.apk
In the android simulator, you can use the instrumentation in Dev tools.To run the corresponding testrunner
In some Android real machines, the devtools cannot be found.
After
Asynctask is an abstract class, And the subclass must implement the abstract method.Doinbackground (Params... P)In this method, You can execute tasks, such as connecting to the network to obtain data.It should also be implementedOnpostexecute
Animationdrawable is a simple form of Android animation, which can be used to implement frame animation.
1. Define the friend. xml file under Res/drawable:
Each item is a frame, Android: Duration = "400" indicates that each frame lasts for 400 ms,
Android edittext Character Count limit
Method 1:Medittext. setfilters (New inputfilter [] {New inputfilter. lengthfilter (constants. max_text_input_length )}); Method 2: although this method is complex, I prefer this method.Private
1. Touch Screen hardware Principle
1.1 resistive touch screen
Interrupt generation. When the touch screen chip is pressed, the resistor partial pressure value changes, causing interruption. The interrupt is input to the CPU. The generation
Most of the time, we bind a value to the drop-down menu, but the spinner does not provide such a service.
So I searched for a long time on the Internet and finally found a simple and easy-to-use solution.
First, define an item class. Note the
In the quick scrolling example of listview, the first letter prompt is added to implement the listview slide and first letter prompt function. However, there are still some problems in practical application. for example, if you switch from another
Get the location of the current sdcard
Environment.getExternalStorageDirectory()
Access sdcard permission settings
When developing network apps, pay attention to various XML configurations !!! Otherwise, it would be a low-level mistake for half a
Today I have made a good research on the speech compression encoding in Android, and I have some tips:
First of all on the collection of sound source format is the PCM-16bit format, What Is PCM format, you can see the following
An error is prompted during running.
-= Warning! =-A folder failed to be renamed or moved. On Windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software .)Please momentarily deactivate
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