Speaking of Android adaptation, it will surely cause a lot of headaches. I will share my experience on Android adaptation here.
In our project, we generally create an android project with only one layout file. In fact, this layout file has many
Recently, I used the items of listview to solve some problems. Now I will take the time to summarize them:
Reprinted to indicate the source:Http://blog.csdn.net/wdaming1986/article/details/6788751
1. If there is a button in the listview item and the
Since I learned Android, I felt that controls could not overlap. For example, I could not put another textview in an edittext. I felt that the controls had a location and could not overlap. However, when I read the android text message source code
========================================================== ========================================================== ====1. Write a broadcast classBroadcast by using the listener of the button, and add the intent object to the onclick In the
In the previous example, I made a simple calculator, and now I have made some time to make a complicated one. The procedure is as follows:
First look at the effect: Click 96*96 = 9216. I will not go through any other operations here!
96*96 =
I. Today I have summarized the following commonly used controls: gridview, gallery, and listview. I hope to help you. The example program is basically changed. Let's take a look at it first:
Homepage effect: Click the interface that appears after
1. Many developers found that in addition to the unstable communication with ddms, the android simulator often has some other problems, such as the failure to start or the failure to properly store user data after each startup, as a result, it can
Recently, an android music bug occurred. When playing music, click the previous one to play the current song and play it from the beginning. Google originally designed the idea to follow the previous CD idea, click back to the start point of the
The last time I wrote about the configuration of building the built-in floating search box for Android, it was quite simple. It was just a bit of trouble. During my demo writing process, I found a problem that was mentioned last time.
Here is
Look at the effect first
After debugging it myself, I finally got it done in the afternoon. Here, let's sort it out. Just go to the code.
Paint paint = new paint (); point myscreencoords = new point (); // converts the current map
In the Android system, it is very convenient to send a status bar notification. Next, let's take a look at how to send status bar notifications. What parameters can be set for status bar notifications?
First, you must use icationicationmanager and
The radiobutton of Android looks really ugly.
When we use it, we need to define it according to the overall interface style. It's just easy to see. Sina Weibo has such a custom style, so I learned it.
See the results:
A little pleasing
1. animation implementation
Define Res/anim/loading. XML as follows:
2. Use custom colors
Define Res/drawable/progress_small.xml as follows:
3. Use an image for customizationDefine Res/drawable/progress_small.xml as
Some software contacts of the contact type are often displayed in the middle of the screen when the contact list is rolling, that is, the contact number at the current position, and so on.
First look at the effect:
The middle pop-up is a
/*** Screenshot method ** @ Param view * @ Param path * @ Param filename */public static Boolean takescreenshot (view, string path) {Boolean issucc = false; /*** to obtain its cache, you must first enable the cache using the setdrawingcacheenable
In the Android system, some friends may need this function.When you press a button in the activity, the response is like pressing the Home Key of the hardware. Such a function can be implemented. Why?Based on the hardware, the driver will generate
About emulator-5554 disconnected! Cancelling 'xxx activity launch '! Solution:
D:
Cd d:/program files/android-sdk-windows-1.6_r1/toolsEmulator-AVD avd1.6
Where D:/program files/android-sdk-windows-1.6_r1/tools is the android SDK directoryEmulator-
The android plotting operation is implemented by inheriting the view and implementing the plotting in the ondraw function.
The following is a simple example:
Public class androidtest extends activity {/** called when the activity is first created. */
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