1 to timely recovery of bitmap memory
The bitmap class has a method recycle (), which can be seen from the method name to be recycled. Here is the question, the Android system has its own garbage collection mechanism, can be periodically recycled
If an object has only a soft reference, the garbage collector does not reclaim it if there is enough memory space, and the memory of those objects is reclaimed if there is not enough memory. The object can be used by the program as long as the
Friends familiar with smartphones know one of the widely used mobile operating system Android open source mobile OS. So what should we do if we want to realize the listening function of the call in this system? Here is a detailed introduction to the
We often see the banner interface of some apps that can loop through multiple ad images and manually slide loops. See that effect, I believe everyone will think of Viewpager, but Viewpager does not support the circular page, so to realize the cycle
The example of this article for everyone to share the Swiperefreshlayout refresh source, for your reference, the specific content as follows
1.SwipeRefreshLayout is Google's support V4 19.1 version of the library update of a drop-down refresh
Android soft references and weak references
1. Softreference: Soft Reference--> when the virtual machine is out of memory, the object it points to is recycled, and the Get method can be invoked when an object is needed.
2. Weakreference: Weak
Jsoup is a Java HTML parser that can directly parse a URL address, HTML text content. It provides a very labor-saving API for fetching and manipulating data through dom,css and jquery-like operations.
Jsoup's official Chinese address:
Before developmentabout the beginning of last year, it may be the Html5 of fire, it is not ... Can always hear from the Internet to the mixed development of XXX, in order to keep up with the trend (although a bit late), we also look at ANDROID+HTML5
Many Android phones are equipped with LED lights, such as HTC's phone charging, new text messages, and so will have a response to the instructions, in fact very simple this is notificationmanager some of the parameters, Below Android123 to everyone
This example describes the anonymous inner class and callback function usage of Android programming. Share to everyone for your reference, specific as follows:
We often use some anonymous internal classes in our Android development, and the
Lead: Preferenceactivity is a convenient setting management interface, but for the interface display is more monotonous, so the custom layout is necessary. This article illustrates the method of customizing layout in preference. The author is in
This paper illustrates the method of cutting canvas for Android Canvas drawing operation. Share to everyone for your reference, specific as follows:
Android is not difficult to cut the canvas, but it is also more trouble to understand, here to
This example describes the Android subtraction operation based on reflection technology. Share to everyone for your reference, specific as follows:
Java Reflection mechanism Definition:
The Java reflection mechanism is in the running state, and
In Android, any control can be scrolled because there are scrollto () and Scrollby () methods in the view class, as shown in the following illustration:
The primary role of the two methods is to move the view/viewgroup to the specified
Now there is a need in the project, the video and documents downloaded in the project are not allowed to play through other players, in training institutions such a lot of demand. To prevent someone from handing over a piece of money, copy all the
This article describes the Android implementation of the method of controlling picture size by gestures. Share to everyone for your reference, specific as follows:
This program is achieved by hand gestures to scale the picture, from left to right
Objective
First look at the effect
What's the good? Don't worry, I'll teach you step-by-step.
Summary of the knowledge points used:
The use of 1.Canvas and pint, we use it to draw dots, lines, words
Basic usage of 2.View
In fact, to do this
When you first started learning service, you thought it was a thread encapsulation, and you could perform time-consuming operations. In fact, service is run in the main thread. Direct execution of time-consuming operations can block the main thread.
Jingdong client's Carousel text effect:
This secondary implementation is only the following scrolling text (in front of the ImageView or TextView implementation can), look at the effect of implementation
Realize the idea
The above figure is
No more nonsense to say, first to everyone on the left and right infinite sliding code.
1. Left and right infinite sliding
public class Mainactivity extends Appcompatactivity {private static Viewpager Viewpager; private radiogroup
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