Recently, I was busy with a small network application, used the Tomcat server on my machine, and accessed the page on this server in the code segment. The address such as: http://www.bkjia.com: 8080/message. jsp or http: // localhost: 8080/message.
In Android development, threads and Timer are often used. If you do not close them actively, the threads are not destroyed when the program ends, but are always running in the background, when we restart an application, we will restart a thread and
Step 1: download and install JDK (Java SE Development Kit)Because both Android SDK and Eclipse are written in Java, you need to install JDK. JDK can be downloaded as follows:Visit the website
TableLayout: The table layout manages the UI component in the form of columns. TableLayout does not need to explicitly declare the number of rows and columns. Instead, it adds TableRow and other components to control the number of rows and columns
I. string segmentation
The String. split () method is also available in the java. lang package. Similar to. net, the return is a struct-type array, but there are some tips during use.For example, Run "2 | 33 | 4". split ("| ")
The result is:
""
2
|
3
Note: The TextView control sets TextView. BufferType. EDITABLE and TextView. BufferType. SPANNABLE parameters.But I don't know what the difference is, so I decided to snoop into the Google Code and check it out.
1. Find the main code of the setText
Broadcast is used in Android programs. There are two ways to register a broadcast receiver:Method 1: register in the AndroidManifest. xml file
You have registered your own broadcast receiver to receive two types of broadcasts. The first is a custom
To enable boot in the Android system, it takes only a few steps.
1. Define Broadcasting
2. register the broadcast class in Manifest. xml
3. Add Permissions
The following is the specific operation.
First, let's define the broadcast
This article mainly discusses the use of the custom adapter and Its notifyDataSetChanged () method (the listener without listView ):
First look at the effect: (during the entire operation, the current Activity is not pause or stop. The figure
The differences between the two registration types are:
1) The first is not a resident broadcast, that is, the life cycle of the broadcast following the activity. Note: remove the broadcast receiver before the activity ends.
2) The second type is
The previous http://www.bkjia.com/kf/201203/123434.html talked about how to map a view to a bitmap, but sometimes the results returned by getDrawingCache () are null and the NullPointException is abnormal, I tried many ways to find the problem. When
In android, creating a dialog box is relatively simple. new AlertDialog. Builder is used to set its information, such as the displayed content, title, whether the dialog box can be canceled by the Return key, OK, and cancel buttons.,
New AlertDialog.
Preface When developing Android applications, new functions are essential. We have added new functions. Some of them can be seen at the first glance, but some new functions are relatively hidden, that is, it is difficult for users to know that you
Problem:
In Android applications, when entering user information, posting comments, and other operations are required, you will inevitably encounter the "form operation" (similar to web form operations) Upload image function.
In this case,
ListView is a very practical method to load images asynchronously. It is generally better to use this method to obtain image resources through the network and enjoy a good user experience. The following describes the implementation method, first
This article describes two mysterious methods of Activity in Android: onSaveInstanceState and onRestoreInstanceState. Some friends may seldom use these two methods in Android development, but sometimes mastering them will help us to achieve better
In the previous tutorial, we have learned what Activity is and how to use it. On a device with a small screen, an activity usually occupies the entire screen and displays various UI view components. Activity is actually a view container. Then, when
1. Linear Layout)
Display its child view elements in a linear direction, vertical or horizontal,
Android: orientation values are vertical "vertical", and "horizontal" is horizontal,
[Html] Android: layout_width = "fill_parent"Android:
Frame Animation, that is, frame-by-frame animation, is a continuous display of images to achieve the animation effect,
The key is to control the image switching frequency. We started to try System. currentTimeMillis (),
The API is interpreted as
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