AndroidUI Optimization
1. layout componentization, use merge and include reuse whenever possible
2. Use styles to reuse style definitions
3. the pop-up control of the soft keyboard should not overwrite the input box
4. Placement of numbers,
I. Android coding specifications
1. the java code does not contain Chinese characters. A maximum of Chinese characters can appear in comments.
2. Local variable naming and static member variable naming
It can only contain letters. The first letter
In a Wi-Fi LAN, a mobile phone can communicate with a computer through a socket. The mobile phone acts as the server and the computer acts as the client. Alternatively, the computer acts as the server and the mobile phone acts as the client.
The
The reason why eclipse encounters garbled characters is that the encoding rules selected by the eclipse editor are variable. Generally, the default is UTF-8 or GBK, when an external import project, if the project encoding method and eclipse set the
Many developers want to use the program to call the camera and process the photos they have taken. First, preview the program.
First, design the Home Page. It is very simple, just adding a button and an image.
[Html] Android: layout_width =
Recently, a new project cannot be started when it is imported and the following error occurs: Conversion to Dalvik format failed with error 1.After google searches, the basic solution provided by the Internet is as follows or similar:1. If you do
We often need to use databases with prepared content, such as dictionaries. This requires loading existing database files and storing them in assets or raw, copy to the internal space of the program when the program is
Dx warning: Ignoring InnerClasses attribute for an anonymous inner classThat doesn' t come withAssociated EnclosingMethod attribute. This class was probably produced byCompiler that did not target the modern. class file format. The
I 've been reading AndEngine recently. I 'd like to summarize some notes!
In fact, the configuration of AndEngine is better configured than Libgdx (another game engine under Android! The only trouble is to import various extensions when configuring
This is the third blog. In this tutorial, We will design the Food class. This is a key part of the game. It directly determines the scalability and playability of the game...
Enter the subject:
Let's take a look at the class diagrams of the Food
Upper, lower, left, and back-up keys on the keyboard. You can directly listen without registering in xml or other places.
The main method is:Public boolean onKeyDown (int kCode, KeyEvent kEvent){Switch (kCode){Case KeyEvent. KEYCODE_DPAD_LEFT:Return
Context literally indicates the Context, which is located in the android. content. Context of the framework package. In fact, this class is of the LONG type, similar to the Handle in Win32,Many methods need to use Context to identify the caller's
Two design models were introduced last time. This time we will talk about the prototype. The prototype is actually easy to understand. It is a prototype, a clone of its own implementation. In travel to the West, there are often events such as the
When the Android device presses the Home key, it will automatically switch back to the desktop. In fact, the implementation method is very simple. Because the Launcher captures the action of the Home key, we can directly send an Intent to the
I am sure that you were very annoyed when I saw this article. Because I was wondering what network I could not solve even such a small problem. What is it? It's not a waste of time. I have tried many methods on the Internet, but I still cannot. What
In windows, android phones can directly communicate with android mobile devices by installing google's usb driver and using the pea clip or 91 assistant. But it is different on linux. Next we will introduce how to use the adb command on slackware
Before playing a GIF on Android, I wrote an article about how to use a GIF file and play it back. You can learn about playing a GIF in http://www.bkjia.com/kf/201203/123237.html here.
If you know something about it, you must know that the above
BroadcastReceiver is used to receive broadcast Intent. The sending of broadcast Intent is implemented by calling Context. sendBroadcast () and Context. sendOrderedBroadcast. Generally, a broadcast Intent can be received by multiple broadcast
There are three events related to Touch events in Android:Public boolean dispatchTouchEvent (MotionEvent ev): transmits the Touch event to the target view (which can be your own ).Public boolean onInterceptTouchEvent (MotionEvent ev): defined in
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.