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
Handler is a class that is used to manipulate message queues within a thread. It's a bit round, it's okay, let's take it slow. The previous looper mentioned that Looper is used to create message queues for threads, that is, looper can allow Message
Today, when learning to implement the drag effect of ink weather, see the use of rewrite framelayout. Turn over the book, suddenly want to understand, why use Framelayout.
In Framelayout, in the book I read, the word is that space will never be
Starting today, this column continues to update the Android Simple Combat blog post. Unlike previous columns, this column has only instances. Each example as far as possible according to the knowledge point corresponding to the content of the
This article for everyone to share the Android bitmap use details for your reference, the specific content as follows
1. Several ways for computer to represent graphics
1 BMP: Almost no compression occupies a larger space2 JPG: On the basis of BMP
A bugThe last few days such a bug is a runtimeexception, the details are as follows:
Copy Code code as follows:
Java.lang.IllegalArgumentException:View not attached to window manager
At android.view.WindowManagerImpl.findViewLocked (
In mobile applications, many times will use the image selection, image cutting and other functions. Recently I am also preparing an open source Photo album project to facilitate the development of applications later use, but also as convenient as
This example for you to share the Android micro-wave function of the implementation method for your reference, the specific content as follows
Import java.util.ArrayList;
Import java.util.List;
Import Java.util.Random;
Import
This example for you to share the Android Viewpager indicator of the production method for your reference, the specific content as follows
1. Overview
Viewpageindicator This open source framework, everyone has been contacted, personal feeling is
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
Step1:Create a new project compass and import a compass picture into the res/drawable-hdpi directory
Step2:UI interface for design applications, Main.xml
Copy Code code as follows:
android:orientation= "Vertical"
Data storage and access
Many times our software needs to store or revisit the processed data.
Android provides a variety of ways for data storage, including the following:
File
Sharedpreferences
SQLite database
Contents provider (content
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
First, the shape of the painting can be specified when the shapedrawable is constructed,
Second, you can use Shape.getpaint (). Setshader (); Specify Shader,shader can accept a picture and matrix
So the problem is solved smoothly:
Specifically
The specific code is as follows:
Main.xml
Copy Code code as follows:
Xmlns:tools= "Http://schemas.android.com/tools"
Android:background= "#000000"
Android:layout_width= "Fill_parent"
android:layout_height= "Fill_parent"
This article describes the Android implementation of the screen-cutting applet. Share to everyone for your reference, specific as follows:
First look at the screenshot, but the screen is not complete, the head of the StatusBar is not, black.
The example in this article describes the method of Android programming to extract URL links. Share to everyone for your reference, specific as follows:
import Java.io.BufferedReader;
Import java.io.IOException;
Import Java.io.InputStream;
Objective
Recently, when you have to do a button to set a picture as a background, but also to define their own rounded corners, the simplest way is to directly cut the fillet picture as a button on it, but if not so how to do it, look at the code:
First look at the effect chart
One: Layout code
The keyboard consists of 0~9 numbers, delete keys, and completion keys, or it can be GridView defined by the adapter's method depending on the requirements getItemViewType . Click on the key when
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