Preface
This chapter is the developer Guide (Dev Guide)/Developing/Tools/android, version Android2.3 r1, translated from "Mobile cloud _ 文bin", welcome to its blog: "http://blog.csdn.net/caowenbin ", thanks again for "Mobile cloud _ Wenbin "! We
The frame layout (FrameLayout) is used to display the screen as a whole each time, and starts from the upper left corner. However, this method has a problem called the display order, that is, the first display layer must be at the bottom layer, and
Recently, a company has a project that needs to access the WebService interface from the Android platform to transfer objects to published functions. I found some information on the Internet and found that ksoap2 can call WebService to transfer
The ListActivity in Android involves two types of click events.1 is short clickOne is long-click
For short press clicksYou only need to reload the following function to void onListItemClick (ListView arg0, View arg1, int pos, long id)For a long
From the previous section, we can know the Dalvik Virtual Machine entry point and the function for creating virtual machines. This section continues to analyze the code snippets of the runtime class calling virtual machines. We need to figure out
Note: we have been developing games on the j2's platform for a long time. I want to switch to android this time. I think it's okay to think about it. So I wrote this article.
Let's talk about the source code.
Package Sur. Face.
Some important attributes used by RelativeLayout:
Class 1: the property value is true or false.
Android: layout_centerHrizontal horizontal center
Android: layout_centerVertical vertical center
Android: layout_centerInparent is completely centered
Both listview and button need to change the background of the original android control, and some information on the Internet is not very comprehensive, so let's summarize the usage of android selector.First, the android selector is configured in
In this example, LabelLayout is used to construct a simple input form:
Android: layout_width = "match_parent"Android: layout_height = "match_parent"Android: stretchColumns = "1">
Android: text = "@ string/table_layout_10_user"Android: textStyle =
Suppose there is an ActivityGroup A, which contains two sub-activities B and C, jump to another Activity D in C, and then execute some operations in D, refresh the D interface when you finish and return D again. How can this problem be achieved?In C,
From the previous lessons, we can see that ListView is used to display a long list and occupy the entire screen (ListActivity ). However, sometimes you may need other similar views, so that you do not have to fill the entire screen. In this case,
Process entry ProgressBar can be used to display the current progress of an operation (such as downloading an object). The application can change the length of a process entry based on the Operation progress. The process bar in Android also supports
In the previous example, temporary data is used to bind List items to solve the performance problems of List items during List scrolling during loading. This example describes how to compile an efficient List Adapter, in fact, it is not a special
In this example, the left and top alignment of A TextView and its parent RelativeLayout are aligned, and then the other View is aligned with its baseline:
Android: layout_width = "match_parent"Android: layout_height = "match_parent">
Android:
RelativeLayout allows child elements to specify their locations (by ID) relative to other elements or parent layout objects.
In this example, RelativeLayout is used to display three textviews. The second TextView (id/view3) occupies the middle part
In this case, there is a main interface MainActivity, which contains two buttons: mButton1, mButton2. press next to jump to Activity1 and Activity2. there is a button in Activity1 mButton3, jump to Activity3, respectively, the redirection method
In this example, both android: stretchColumns and non-TableRow are used as sub-views of TableLayout. In this case, the non-TableRow sub-View is extended to the whole row, which is the separator we need to display.
Android: layout_width =
You can use AnimationListener to monitor the running process of Animation.
[Java]AnimationSet as = new AnimationSet (true );RotateAnimation al = new RotateAnimation (0,-720, Animation. RELATIVE_TO_PARENT, 0.5f, Animation. RELATIVE_TO_PARENT, 0.5f
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