The interviewer also asked the Handler? Then I'll tell you a story
Come on, little brother, what's the matter with Handler
There are too many blogs related to Handler, and there are a large number of random searches, but they basically post the source code and pose when they come up. It's not easy to understand the overall relationship and process in a short time
Interviewer, sit down and listen to my story? ...
Added by jd6th on Fri, 24 Dec 2021 00:26:09 +0200
2021-08-16 yuan sharing mode notes
Definition and characteristics of sharing mode
Definition of Flyweight mode:
Sharing technology is used to effectively support the reuse of a large number of fine-grained objects. By sharing existing objects, it can greatly reduce the number of objects to be created and avoid the overhead of a large number of similar classes, so as to imp ...
Added by inkdrop on Thu, 23 Dec 2021 18:09:55 +0200
Comprehensive screen adaptation scheme for Android bangs screen and water drop screen is a must for Tencent Android interview
* `LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES`
* `LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER`
The default value is`LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT`,The fringe area will not display content, and the value needs to be set to`LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES`
You can simulate the screen gap on any device or simulator running Andro ...
Added by alarik149 on Thu, 23 Dec 2021 16:02:13 +0200
JDK dynamic agent won't hit me after reading it
WHAT
Dynamic agent is a kind of agent mode. Agent mode refers to that the agent helps the proxy object complete what should be completed by the proxy object. Agents usually have more powerful capabilities and are more professional than the objects they are represented. Take an example in life to illustrate that you can choose to find the landl ...
Added by satanclaus on Thu, 23 Dec 2021 09:10:23 +0200
Summary of 23 design modes
Definition of design pattern
Software Design pattern, also known as Design pattern, is a set of code design experience that is repeatedly used, known by most people, classified and catalogued. The purpose of using Design pattern is to reuse code, make code easier to be understood by others, ensure code reliability and program reusability.
Ope ...
Added by Spitfire on Thu, 23 Dec 2021 04:16:21 +0200
android source code -- Summary of view creation principle
1, android interface composition
Activity: control model, control Window. Window: host model, which is responsible for hosting the view. View: display model, used to display. ViewRoot(ViewRootImpl): it is the link between WindowManager and DecorView.
2, View create overall process summary
1, in ActivityThread's performLaunchActivity, we ca ...
Added by MiCR0 on Thu, 23 Dec 2021 02:47:25 +0200
Self study Hongmeng application development (31) - define drawing actions for UI components
Ready to draw interface
The drawing action of UI components is triggered by the application architecture, and the developer of custom components only needs to implement and log in to the drawing interface.
The following code implements the drawing interface component of UI component through multiple inheritance After drawtask, execute the dra ...
Added by simple_man_11 on Thu, 23 Dec 2021 01:52:20 +0200
Design mode series [21]: detailed explanation of agent mode (agent design mode)
In some cases, a customer cannot or does not want to directly access another object. At this time, it needs to find an intermediary to help complete a task. This intermediary is the proxy object. For example, you don't have to go to the railway station to buy train tickets. You can buy them through 12306 website or go to the train ticket agency ...
Added by 00Sven on Wed, 22 Dec 2021 14:41:20 +0200
[design mode] template method mode (introduction | applicable scenarios | advantages and disadvantages | code examples)
Introduction of template method mode
Template method pattern: defines the skeleton of an algorithm and allows subclasses to provide implementation for one or more steps;
The template method pattern enables subclasses to redefine some steps of the algorithm without changing the algorithm structure;
Template method mode type: ...
Added by paulg on Wed, 22 Dec 2021 12:28:05 +0200
Enjoy element mode of GOF23 design mode Flyweight
This paper briefly introduces Adapter mode
Enjoy element mode Flyweight
summary
Using sharing technology to effectively support a large number of fine-grained objects. It is mainly used to reduce the number of objects created to reduce memory consumption and improve performance. This type of design pattern belongs to structural pattern ...
Added by SaxMan101 on Wed, 22 Dec 2021 11:56:44 +0200