0. Foreword
Android Animation is a frequently asked topic during an interview. We all know that Android animations fall into three categories: view animations, frame animations, and property animations.
Make an overview of these three animations first:
View Animation is a kind of progressive animation, through the i
Android View system analysis (below), androidview
Android View parsing series:
Analysis of Android View system (I)
This section describes the basic knowledge of a View, sliding, elasti
Learn android The GridView component displays all components in a grid. For example, when creating an album, all the images are displayed in different grids of the same size, the inheritance structure of this component is as follows: java. lang. object upload android. view. view every
The content is Bo master according to the book knocked out, Bo main code word very hard, reproduced please indicate the source, after the subsequent content will code out.The previous custom view (i) (Android) is about extending the existing controls , which introduces the second custom view method to Create a composite control .To create a composite controlCreat
The example in this article describes how the Android implementation saves view to bitmap. Share to everyone for your reference, specific as follows:
1,
Public Bitmap Convertviewtobitmap (view view) {
Bitmap Bitmap = Bitmap.createbitmap (View.getwidth (), View.getheight (),
Bitmap.Config.ARGB_8888)
Original: Android 0 Basics Section 61st: Scrolling view ScrollViewPrevious installments studied ProgressBar series components, Viewanimator series components, Picker series components, and time-date series components, and then continued to learn about other common components.I. Overview of ScrollViewFrom the previous study some students may have found that when there is a lot of content when the screen disp
. But these methods are all: the Onmeasure () method, the OnLayout () method, the OnDraw () method.Onmeasure () Method: Single view, generally override this method, for the Wrap_content case, specify the view default size value, to avoid the match_parent situation consistent. ViewGroup, if not rewritten, executes the same logic as the list view and does not measu
The example in this article describes how Android determines whether touch event points are in view scope. Share to everyone for your reference, specific as follows:
Private Rect mchangeimagebackgroundrect = null;
Private Boolean Isinchangeimagezone (view view, int x, int y) {
if (null = = Mchangeimagebackg
The sub-thread updates the UI.
Obviously, if your program needs to execute time-consuming operations, it would be wrong if the main thread is responsible for executing the operation as in the previous example. Therefore, we need to create a new sub-thread in the onclick method to call Google API to obtain weather data. The easiest way to think of Android Developers is as follows: Java code
Public void onclick (v
The problem of sliding collisions (such as scrollview or nesting of Sliddingmenu and ListView) is often encountered in Android development, which requires a deep understanding of the Android Incident response mechanism to solve The incident response mechanism is already an essential knowledge for Android developers.
1. Common methods of Incident responseThe
FrontierAndroid has introduced material design elements from 5.0, a new design language that gives the entire Android user experience a fresh start, and Google has encapsulated some of the important material in the Android Design support library. Design control, there have been a lot of different material design controls on GitHub before, but now Google has standardized some controls, note that the
The upper-left corner of the Android phone's screen is a coordinate system, while the y-axis direction is reversed with the y-axis of the Cartesian coordinate system. By providing an API such asGetLeft,GetTop,Getbottom,GetRight can get the relative position of the control in the parent. At the same time, you can also get the absolute position of the control in the screen, detailed usage can refer towhere to get vi
Translation
I have been working on the screen lock interface recently. I have also written some simple principles about the screen lock interface before. I didn't want to really understand it myself.
I found that the screen lock framework is big and complex, mainly reflected in the following two aspects:
1. Interface Composition and update mechanism;
2. For power management control, the system's power management will be disabled on the screen lock interface, and the screen brightness control
when the view is added to the parent view.4. If the Attachtoroot parameter is not set, the default is true if root is not the Null,attachtoroot parameter.All controls, such as Layout_width, have a parent layout to take effect because this is used to set the size of the view in the layout, not the size of the view, so
Android custom view and Custom Attributes
This is the content in Android UI Fundamentals.Create a custom View
To create a custom UI component, you must first inherit a View class.First, create a simple custom view to display a cro
1. Transparency AnimationAnimation of changes in the source code to achieve transparency:(1) Add a button,id to btn in the layout file.(2) Mainactivity.javaFindviewbyid (R.ID.BTN). Setonclicklistener (new View.onclicklistener () { @Override publicvoid OnClick (view view) { new alphaanimation (0,1); Aa.setduration (+); View.startanimation
Android-event distribution and carousel between ViewPager and internal view
How does viewpager trigger the event on the view during the sliding process? In other words, does viewpager slide the view in the sliding process, or does it slide the viewpager itself?
I. Sample Code:
1. Customize ViewPager: MyViewPager, redis
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.