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
First, the preface
This article mainly introduces a practical case is how to modify the geographic information of the system through this framework to realize the hidden function, in today's development of social tools, especially micro-letters, he
Sidebar is a common interface effect in Android applications (drawer effect). Using Drawerlayout to implement the right-hand column is relatively straightforward. And this control has its own sliding effect, very convenient.
Drawerlayout belongs to
This example tells the Android imitation Baidu Google search automatic prompt box Autocompletetextview simple application. Share to everyone for your reference, specific as follows:
Now we almost all use the internet Baidu or Google search
This article illustrates the dynamic loading layout of Android programming. Share to everyone for your reference, specific as follows:
Since the previous time the project needs to be loaded on one page depending on the different buttons loaded on
This article mainly explains the Android browser Development example, has three parts: launches the Android default browser, the specified browser accesses and opens the local HTML file.
First, start the Android default browser
Java code
When it comes to software development, we usually like to use newer versions of the tools, but why do I use a lower version of the SDK to develop the Android game? Here are the reasons:
1, the Android SDK belongs to backward compatibility! So the
Dip:device independent pixels (device independent pixel). Different devices have different display effects, this is related to the device hardware, we generally support the WVGA, HVGA and QVGA recommended to use this, do not rely on pixels.px:pixels
Theme theme is used to set the UI style of the interface, you can set the entire application or an activity of the interface style. The following theme are built into the Android SDK and can be categorized by whether the title bar and status bar
We all know that the Android default Expandablelistview group header cannot be pinned to the interface, and when scrolling down, it is not possible to indicate to which group the child is currently displayed. Search on the Internet a lot about
The main content of this article from Android Doc, I translated and done some processing, English good friends can also directly read the original.Http://developer.android.com/training/displaying-bitmaps/index.html
Load large pictures efficiently
Recently, a friend asked the problem of the screen lock, they are also learning, online look for the next not too detailed examples, look at the information book on the screen locking procedures, the next small determination to follow the official
Objective
Android custom controls often use canvas to draw 2D graphics and must be proficient in canvas drawing mechanisms before optimizing their own custom control skills. This paper explains the canvas drawing mechanism from the following three
A lot of times we need to download the images on the remote server on the Android device to display, and today we'll sort out two better ways of downloading the remote pictures.
method One, directly through the HTTP class provided by Android to
Filter out other players and use my own player to do
Copy Code code as follows:
Wv.setwebviewclient (New Webviewclient () {
Public boolean shouldoverrideurlloading (final WebView view,
Final String URL) {
if (Url.contains ("3gp") |
Products to do check-in function, check-in function to be based on a calendar, so on the basis of custom customized a calendar
Custom controls believe that doing Android knows:
(1) First create a class, inherit a container class, or a control
(2
Now because Gwf,google basic and we say we see, it is to do Android now or want to learn Android friends bring a lot of inconvenience, the simplest is the Android SDK Manager you can not update.
Now there is a solution, as follows.
1. Start the
When the screen rotates and switches, the Android mechanism is:Destroy the current screen activity, and then reopen a new activity that adapts to screen changes.So how do we get the page information not reset when the screen is switched?
Solution
This article describes the implementation of Android download file function of the complete sample code, for learning and research on Android programming is believed to have some help, especially for Android beginners have some reference value.
The
Android positioning generally has four methods, these four ways are: GPS positioning, WiFi Dingzhun, base station positioning, AGPS positioning, &NBSP (1) Android GPS: Requires GPS hardware support, direct and satellite
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