A long time, the system is easy to forget the knowledge point, and now comb the Android from the various modules of the knowledge structure, summed up the written. Intent related blog post:
Overview and use of Intent in Android
The Intent object and Intent Filter filter matching process in Android
Common usage in the Intent - Android (with source code download) Handler related posts:
The use of Handler in Android
Deep source analysis of Android in the...
An overview of the Android in the use of Canvas to draw a variety of graphics, you can use Paint.setShader (shader) method for the brush Paint set shader, so you can draw a colorful graphics. So what is Shader? Did GPU drawing the students should know the meaning of words, is the Shader shader. We can understand this, Canvas in a variety of drawXXX methods to define the shape of the graph, the brush in the Shader is defined by the graph coloring, appearance, the two knot...
Overview class android.graphics.PorterDuffXfermode inherited from android.graphics.Xfermode. In Android canvas drawing can be through the use of PorterDuffXfermode the mapped graphics pixel and canvas in the corresponding positions of the pixels are mixed according to certain rules, forming new pixel values, so as to update the canvas in the final pixel color value, it will create many interesting effects. When using PorterD...
We have a TextView, the contents of which can be dynamically changed by the code, we want to use a picture as the background of TextView, similar to the phone QQ dialog in the bubble text effect. TextView is defined as follows: android:text= @string/hello_world "<TextView"
Android provides a variety of types of Drawable, you can also use XML to define a variety of Drawable. This paper focuses on how to use shape in the definition of XML node GradientDrawable. XML defined by the drawable file in the res/drawable directory. The syntax of the GradientDrawable is defined in the XML file as shown below:
Veiw Android from the memory to appear in the UI to successively went through three stages: calulated - > layout - > drawing. About the view of measurement, layout, drawing the overall mechanism can see Bowen "Android in view of the layout and drawing mechanism. Measurement is the basis for the layout of, if want to understand the calculation details, see Bowen "view source code analysis Android measure calculation process. This article will be from the source point of view of the View analysis of the layout of the layout process, this paper will detail the process of View layout...
When our fingers on the Android screen click or slide, it will trigger a touch event TouchEvent. In ViewGroup View and App there is a multi-level nested, in the outermost layer is Activity, the innermost layer of View, between View and Activity is some of the ViewGroup. In order to simplify the discussion, we assume that there is only one Activity in a ViewGroup, the ViewGroup has only one View. When we touch the UI View with our fingers,...
Android in the animation is divided into view animation (Animation View), the properties of animation (Animation Property), as well as Drawable animation. From Android 3 (Level API 11), Android began to support the property animation, this article mainly to explain how to use the properties of animation. On the view of animation can see Bowen "Android four view animation.". The limitations of the view animation are relatively large, as described below:
View animation can only be used on View.
Android in the animation is divided into view animation (Animation View), the properties of animation (Animation Property), as well as Drawable animation. Android from the original version to support the view animation, the view animation as its name implies, is applied to the animation on the view View. View animation of the core category is android/view/animation/Animation, the class is an abstract class, the class has five sub categories, respectively, AlphaAnimation, Transla...
If you are not familiar with the canvas drawing, it is strongly recommended that you read the blog "Android canvas drawing detailed (attached source code download)", this paper on Android in the canvas drawing foundation were detailed description. This article focuses on how to use the MaskFilter to create a fuzzy shadow and relief effects. We know that the various drawXXX methods in Canvas determine the shape of the geometry of the drawing, and the brush Paint determines what effect to draw these graphics. There is a setMaskFilter in Paint...
Graphics rendering can be divided into two types: software rendering and hardware rendering. Software rendering is based on CPU computing all coordinates and draw, mainly memory; hardware rendering is on GPU, the main occupation of memory, the general 3D graphics programs (OpenGL, DirectX) is GPU accelerated. Prior to 2D, API drawing Android3.0 only supports software rendering mode, starting from 2D, Android3.0 drawing API began to support GPU hardware rendering, that is, the Canvas View drawing operation will use GPU, so from Android 3...
Android, if we want to draw a complex custom View or game, we need to be familiar with the drawing API. Android through the Canvas class exposes a lot of drawXXX method, we can draw a variety of graphics through these methods. Canvas drawing has three basic elements: Canvas, drawing coordinate system and Paint. Canvas is a canvas, we are through the various drawXXX Canvas method to draw graphics to Canvas above, in the drawXXX method we need to be introduced to draw the graphics...
We know that when configuration change (such as horizontal and vertical screen switching), causing the activity to restart, namely destroy first and then restart, general restart time is short, in order to ensure a consistent user experience, we should some data storage down before the activity to restart, then in restart again according to these data to update the UI. Of course, you might want to write these data to a physical file or database, but this has drawbacks, because IO is a time consuming exercise...
View of the measure method is quite clever, know how to use lazy to measurement data, if the situation changes, then is called onmeasure methods of actual measurement, in onmeasure, view to combining the view itself to the size, according to the parent ViewGroup to transfer in the widthMeasureSpec and heightMeasureSpec, considered to calculate the width and height of the final measurement, and stored to the corresponding member variables, this marks the view that the measure effectively complete the,...
1. Android from top to bottom all view by measuring that Android will know each view to size, wide high information
2. After completing the measurement work of all view, Android will from top to bottom all view layout, Android will know each view in its parent control the position of that view to its parent control of the four sides of the left, right, top and bottom
3 after the completion of the layout of all the View work, Android will be carried out from top to bottom for all View...
If the concept of loader, AsyncTaskLoader, cursorloader, loadermanager etc. do not understand or do not know how to use the mechanism of loader, see Bowen Android loader and loadermanager use (attached to the source code download). This paper mainly through the study of the life cycle of Loader and its sub class to the Loader and its subclasses, LoaderManager source code for research. Loader is by LoaderManager tube...