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,
9. Create a rounded corner ImageThe main principle is to use a mask to create a rounded corner box and place the image below:
1. Bitmap myCoolBitmap = ...;
2. int w = myCoolBitmap. getWidth (), h = myCoolBitmap. getHeight ();
3. Bitmap rounder =
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
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
Previous: http://www.bkjia.com/kf/201202/120057.html[Java]Establish unit tests for java projects.Note that the function name of the unit test method must start with test. Otherwise, an error is returned.Import java. io. ByteArrayOutputStream;Import
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
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
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
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
When writing Android programs, we always encounter out of memory errors. Here, I use Gallery as an example. In the simulator, there will be no OOM error. However, once the program is run into the real machine, there will be more than one picture
By default, an activity occupies the entire screen. However, you can set a "dialog box" topic for an activity so that it can be displayed as a floating dialog box. For example, you may want to define your activity as a pop-up "dialog box" to notify
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 the user experience is good, so users do not have to wait, the implementation method is
Host: ubuntuTarget: Android ICS
1. Put gdbserver and gdbclient into target and host respectively. Both can be found in the prebuilt directory of the android source code.
2. Start gdbserver on Target and execute$/Path/to/gdbserver: 1111 -- attach
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
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
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