Understand the number of linearlayout#on measure calls to child from the perspective of source code
Those who are familiar with the drawing process know that ViewGroup can decide the drawing time and call times of child.
Today we will start from LinearLayout Start learning and see how many times it calls onMeasure for the child View.
For simplicity, we choose the time to enter the Activity in the previous blog When entering Activity, why is ...
Posted by QSDragon on Fri, 04 Mar 2022 15:36:02 +0100
Caller ID
Caller show - caller tagging
The company's office app has its own address book. Sometimes when others call, the contact information of this contact is not saved in the mobile phone, and they are afraid of harassment after receiving the call. Therefore, I want to add an incoming call tag of our company, that is, the incoming call show function. ...
Posted by emrys404 on Fri, 04 Mar 2022 12:22:57 +0100
On the shouldOverrideUrlLoading method in Android
Public Boolean shoulderoverrideurloading (WebView, string Url) is a method defined in the WebViewClient class. Some online blogs say that the function of this method is to control the opening of Url in the current WebView when the return value is true, and call the system browser or third-party browser when it is false. But in fact, this statem ...
Posted by scialom on Fri, 04 Mar 2022 10:55:46 +0100
Android View event system
View event system
Although View does not belong to the four components, its role is comparable to the four components, and even more important than Receiver and Provider. In Android development, Activity undertakes this visualization function. At the same time, Android system provides many basic controls, such as Button, Textview, CheckBox, et ...
Posted by Kevin3374 on Fri, 04 Mar 2022 08:42:13 +0100
Kotlin writes an interpreter --- lexical analysis
Why
Recently, I'm very interested in compilers. Why should I learn the compilation principle? For me, it's because I need to write a DSL and an interpreter recently. For most programmers, learning compilers may have the following three aspects:
(1) Learning compiler design can help you better understand the program and how the computer runs ...
Posted by tisource on Thu, 03 Mar 2022 21:29:25 +0100
Android - Section 10 JSON explanation
1, Introduction to JSON
JSON(JavaScript Object Notation) is a lightweight data exchange format. It is based on a subset of JavaScript, which is easy for people to write and read, and easy for machine parsing. JSON adopts a text format completely independent of the language, but it also uses habits similar to the C language family (inclu ...
Posted by getmizanur on Thu, 03 Mar 2022 20:26:56 +0100
Why does the setOnClickListener reference Activity of view not leak memory
Learning is done
preface
Q: an Activity implements onClickListener. At this time, a Button uses setOnClickListener(this) Why is there no memory leak?
A: because the View reference object will be released when the Activity is destroyed, there will be no memory leakage.
Q: can you make it more detailed?
Answer: Yes, Well, the window wi ...
Posted by Dragoonus on Thu, 03 Mar 2022 17:44:06 +0100
uiautomator+cucumber to realize automatic test of mobile app
premise
Due to the business requirements of the company, the automatic test should meet the following points:
Cross application testingStrong readability of test casesThe test report is readableScreenshots of failed use cases are saved and reflected in the report
Based on the above points, we chose uiautomator when selecting the automation t ...
Posted by ashley526 on Thu, 03 Mar 2022 16:33:40 +0100
Android - Section 9 network programming
1, Network access overview
Let's explain and review. We learned Android's UI, various layouts and controls before. In fact, when we work in the future, this UI does not need us to design. A designer will design the UI for us, and then we will restore the UI in the form of code in xml file. For example, the following figure is the data c ...
Posted by stef686 on Wed, 02 Mar 2022 16:53:33 +0100
Reductive layout of Android layout
The horizontal layout and the vertical layout of cistrant Android are very familiar. Does it seem that the horizontal layout and the vertical layout of cistrant Android are well aligned?
In fact, it is an upgraded version of the relative layout,
layout_contrainTop_toBottomof: in fact, the upper edge of the current component is aligned wit ...
Posted by jomofee on Wed, 02 Mar 2022 15:47:02 +0100