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
I just joined google + yesterday. A friend who needs an invitation code left a mailbox. I will send it to you!
1. Create an android project and enter the properties of the project, as shown in.
2. Click Finish, as shown in.
3. You do not need to
The ownership of the Activity, that is, the adsorption relationship between the Activity and the Task in which the Activity should be located. We know that in general, in the same application, all started activities are in the same Task, and they
In Android:
1. the memory of a process can be composed of two departments: java memory application and C memory application. The sum of the two memories must be less than 16 Mb. Otherwise, the OOM is familiar to everyone, this is the first OOM.
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.
Styles. xml style: Style. xml Code Use the upper interface class of AlertDialog: Java codeDialog reNameDialog = new Dialog (getContext (), R. style. FullScreenDialog );LayoutInflater mLayoutInflater = (LayoutInflater) getContext (). getSystemService
Today, if you want to temporarily disable the buttons, you can press them only when certain conditions are met. At first, I thought it was setClickable.
Please refer to the manual:
[Java]Public void setClickable (boolean clickable) Since: API Level 1
The following design guidelines are designed to enable the Android user experience team to maintain the best user experience. Integrate them into your creativity as your design philosophy, rather than intentionally using them.
Attract meTry to
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,
Android Network Programming is divided into two types: socket-based and http-based.
Socket-based usage
Server:
Start a server socket ServerSocket svr = new ServerSocket (8989 );
Start listening for request Socket s = svr. accept ();
Obtain the input
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 Android development, we often need to know the version information of the current application. You can perform automatic upgrade judgment. Extended Custom data meta-data. How can we obtain this information in AndroidManifest. xml?
The following
Close the keypadInputMethodManager imm = (InputMethodManager) getSystemService (Context. INPUT_METHOD_SERVICE );Imm. hideSoftInputFromWindow (myEdit. getWindowToken (), 0 );
The following methods can be used to restore the display:
Boolean
ProgressBar provides a visual feedback when executing some tasks that are being processed. For example, you need to update the download status after downloading data from the web server. In this case, ProgressBar is a good choice. The following
This example introduces layout_weight usage. layout_weight usage has been described earlier: for example, Android ApiDemos example resolution (147): Views-> Layouts-> LinearLayout-> 7. Fill Parent
And Android ApiDemos example resolution (143):
GetLocalVisibleRect: return a filled Rect object. It feels like the Rect size of this View, left and top get 0.
GetGlobalVisibleRect: obtains a view area of the global coordinate system and returns a filled Rect object. This Rect is based on the
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