The implementation effect is as follows:
Realize the idea:
1, how to achieve the effect of the round water surface: The use of paint Setxfermode attribute for PorterDuff.Mode.SRC_IN draw the progress of the rectangle and the intersection of the
In the normal development process, our ListView may not simply display the text or buttons, more show the complex layout, so we have to write their own layout and custom adapter, usually inherited from Baseadapter, sample code see below. Write
Add string
Add a string to the Android Frameworks/base/core/res/res/values, for example, add a string to the String.xml
Copy Code code as follows:
service was enabled for:
You also need to add a public.xml file in the
We see the micro-letter Home switch effect has not felt very cool, sliding switch, click on the bottom bar instant switch, sliding transition gradient effect, online effect chart:
Before also on the blog to see other people's implementation, and
One, color resources1. color XML file format
Copy Code code as follows:
//resources root element
#000000
Color child element
2. Reference format:
Java code: R.color.color_name (This is an int-type data that
Android version of the replacement, the new version brings new features, new methods.
The new approach brings many conveniences, but it cannot run on a lower version of the system, and if the compatibility is not handled properly, the app will be
Now, mobile apps penetrate all walks of life, the numbers are hard to count, most of them use the web and the interaction with the server is overwhelming, so what are the ways to access the Internet in Android?
Now we've summed up six ways:
(1)
The most complex graphics in Android are made by path, such as drawing a curve and then moving an object along with the curve, such as a search button, such as a simple clock implementation:
So what is path!
Definition: path is the way, which is
1, dialog box notification (Dialog Notification)
When your application needs to display a progress bar or require the user to confirm the information, you can use the dialog box to complete it.
The following code opens a dialog box as shown in the
Common data conversion methods for Android and MCU communication
1. Convert GB2312 into Chinese, such as bafac2dcb2b7→ carrots, two bytes to synthesize a text
public static string STRINGTOGBK (String string) throws Exception {
byte[]
This example shows how to change the order of existing activity in the current task stack by setting the intent object's markup.
1. Activity initiation Tag description for intent object:
Flag_activity_brought_to_front
This tag is
Development of the application will have some may become a value, such as WebService address application of some IDs, etc., has been directly in the application of the code, not forget the point that, then think of the properties can be used
Nearly three months did not write a blog, because of work transfer, a lot of experience, ideas have no time to record down. Now the time is a little abundance, I will try my best to take the time to make up the things I want to write without writing.
Recently to help Friends do an animated menu, feel a certain practical value, here to share with you, first look at the effect:
Realize the idea:
As you can see from the diagram, these three (or more, need to realize) the menu revolves around
This article is about the Android custom view of the random generation of image verification code, development, we will often need to generate a random image verification code, but this is second, the main still want to summarize some of the custom
Objective
As you all know, Android Studio has now been updated to 2.0 Preview 6, and Google's highly prized development tool has incomparable advantages over eclipse ADT. However, in the actual use, there are still a lot of uncomfortable places.
Last week to write a demo, modeled on NetEase a dollar of the drop-pull refresh effect.
The original effect is (part one) a little sun pulled down and then loosened up and bounced back up,
(Part II) drop another coin to rotate in the middle axis.
android--Multi-Thread handler
Objective
The Android messaging mechanism is another form of "event handling", which is primarily designed to address the problem of multithreading in Android applications, where the newly initiated threads of
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