Android Window series - WindowManager Source code analysis of addview (update of View)

summary The previous article explained the knowledge points related to window and decorview. Interested readers can see the following: Android Window series (I) - window and decorview This article will continue to explore the relationship between window and view, mainly focusing on "how to add view to window". How to add View in w ...

Added by Renich on Thu, 17 Feb 2022 22:47:20 +0200

Inherit ViewGroup to learn onMeasure and onLayout

When inheriting the ViewGroup class, you need to override two methods, onMeasure and onLayout.1, call setMeasuredDimension method void android. in method onMeasure. view. View. setMeasuredDimension(int measuredWidth, int measuredHeight)In onMeasure(int, int), you must call setMeasuredDimension(int width, int height) to store the measured width ...

Added by klik on Wed, 15 Dec 2021 12:23:46 +0200

Event distribution and sliding conflict resolution of View

1, Type of touch eventACTION_DOWN: user's finger press operation. A press operation marks the beginning of a touch eventACTION_UP: user's finger lifting operation. One lifting marks the end of an eventACTION_MOVE: before the finger is pressed and lifted, if the moving distance exceeds a certain threshold, action will be triggered_ MOVEOne touch ...

Added by lopes_andre on Tue, 30 Nov 2021 09:09:39 +0200

You must know the basics of advanced UI growth View

prefaceView can be said to be a role used every day in daily development. Although view does not belong to the four components, its role and importance can not be underestimated. This type of article is intended to write a series to provide a way for self review or novice learning.View BasicsThis article mainly introduces some basic knowledge o ...

Added by Karl33to on Sat, 13 Nov 2021 00:28:05 +0200

Interviewer: why do you customize the wrap of view_ Will content fail?

preface Interviewer: why wrap in custom View_ Will content fail? To answer this question, we need to understand the past and present lives drawn by view When is the view drawn? In which life cycle of the Activity is the view drawn? After onResume Get to know viewrootimpl We know that the onResume method is actually just a callback method ...

Added by ecco on Tue, 02 Nov 2021 11:36:55 +0200