Public Enum config {// These native values must match up with the enum in skbitmap. h alpha_8 (2), rgb_565 (4), argb_4444 (5), argb_8888 (6); config (INT Ni) {This. nativeint = ni;} final int nativeint;/* package */static config nativetoconfig (INT
1. textview
Effect: although the textview text provided by the system has its own effect, the effect can be achieved only when the focus is obtained,
Therefore, you need to override the isfocused () method of the textview class so that it
1. color # RGB # argb # rrggbb # aarrggbb
The color resource should be under the label.
The res/values/colors. xml name can be customized.
Define value
Use the resourse. getvalues. getcolor or R. Tag Name. "name" attribute, for example,
Monkey is a self-designed stress testing tool for Android.
It can run in a simulator or on a real device. It sends a pseudo-random user event stream to the system to test the stress of developing applications.
The basic syntax is as follows:Monkey
Document directory
1. Basic Framework of the project file
Getting started with Android1. After creating an android project, the basic framework of the project file will automatically generate several files. The first is the SRC file, which
I have written a lot of projects developed using the boost library in the past, and recently I have prepared to transplant some code to Android (I have not studied the upper-layer interface or the JNI layer, now, only the code porting and
1. Price display problems such as price display (¥358,179,682) are often encountered in application development.
Private string getstring (string Str){If (Str. Equals ("") | STR = ""){Return "";}Else{Locale. setdefault (locale. China); // in Chinese
Step: Obtain the URL object URL through the new URL (target URL string) ----> call the openconnection method of the URL to obtain an httpurlconnection object connection ----> call the getinputstream method of connection to obtain an inputstream
When the Android: configchanges of the activity is not set, the split screen will re-call each Lifecycle
When setting the activity's Android: configchanges, the split screen will not re-call the Declaration cycle, but will only execute the
This is made after viewing the online materials and examples in the android SDK development example book. It is basically stuck, but only a few codes are added. The following code is used:
Public static string uploadbitmap1 (string urlstring, byte
Method 1:
The canvas class is used for drawing. you can use the canvas class member functions to draw any part of the image as you wish. canvas. cliprect: Set the display area canvas. drawbitmap: Drawing example: bitmap B = bitmapfactory.
To access the local server using Android, you need to set permissions: Other permissions:I summarized some frequently-involved permissions during my learning process for the author's reference:Add WiFi and network access permissions: Operation
Some minor problems, not big! But it is enough for you to spend a day or a week solving the problem!Original article: reposted by geolo. And Article Source: http://itmanito.com/geolo? P = 381. The listview event in Android cannot be clicked.
If the
I checked progressbar yesterday and summarized it today.
The progressbar class is in/froyo/frameworks/base/CORE/Java/Android/widget/progressbar. Java
When you go to a new progressbar, you need to pass in the parameters. Let's take a look at the
1. Download, compile, and install the latest Android source code on Ubuntu
1. Prepare the environment.
1. the disk space is reserved for about 20 GB and the memory is 3 GB. Because the VM is running while the host is running, the memory
Call System photo
Intent I = new intent (mediastore. action_image_capture );
File myimagedir = new file (temp_take_photo_file_path );
// Create an image storage directoryIf (! Myimagedir. exists ()){Mylog. D (this, "create the path:" +
Scenario:
Activity-> show progressdialog-> get data from service
Activity display data
1. If the service takes a long time to obtain data, for example, retrieving data from the network may result in timeout. In this case, separate threads
The prepare process of Android mediaplayer has many actions, such as demuxer and find codec. If it takes a long time, ANR will appear. The Android system will check whether the main thread has a response in five seconds, if not, an error message is
The surfaceview size of the default player in the Android system is regarded as good at the beginning and cannot be changed. To enable full-screen playback, You need to inherit the videoview class to expand the function.
This is mainly the onmeasure
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