Jetpack Compose · snapshot system

Jetpack Compose introduces a new method for handling observable states - Snapsot. In Compose, we trigger reorganization through the change of state. Please consider the following questions:Why can state changes trigger reorganization?How does it determine the scope of reorganization?As long as the state changes, will it be reorganized?Let's stu ...

Posted by Rottingham on Mon, 07 Feb 2022 14:02:39 +0100

The of Java design pattern -- template method

As one of the design patterns of Java, Template Method summarizes its advantages and features in one word: Abstract steps Next, record the understanding in the form of a question and answer Question 1: now you want to make a cake, you will do many things. We will make the cake into the code as follows. Now you have a whim and come up with a ...

Posted by definewebsites on Mon, 07 Feb 2022 12:47:38 +0100

Android APP complete basic tutorial (16) graphics system - image effects

This part mainly introduces some common special effects based on Canvas's drawing system. 1 twist effect Bitdrawpms is used to process the distorted image. This effect is mainly to display the distortion effects such as "water wave rippling" and "red flag flying" on the APP, which is very flexible. drawBitmapmesh is define ...

Posted by carmasha on Sun, 06 Feb 2022 04:02:35 +0100

Java reflection: Class class, dynamically loading Class, obtaining method and member variable construction information, basic operation of method reflection, essence of collection generics

System.out.println(c2.getSimpleName());//The name of the class that does not contain the package name System.out.println(c5.getName()); } } ClassDemo3.java public class ClassDemo3 { public static void main(String[] args) { String s = ...

Posted by ThEMakeR on Fri, 04 Feb 2022 08:19:24 +0100

Flutter entry series - file system

Because fluent is only a UI system and does not have the ability to operate the native system, it can not directly operate the file system. Therefore, it can only realize this function with the help of plug-ins. provider_path is a plug-in widely used in pub. Let's start accessing the plug-in to complete the corresponding file reading and writin ...

Posted by Clintonio on Fri, 04 Feb 2022 05:04:56 +0100

Android: ContentProvider data access

ContentProvider mechanism The Android system sets the read-write permission for the data file of the application. In order to realize the function of accessing data across applications, Android provides the ContentProvider mechanism. ContentProvider is one of the four components of Android. It is used to share data externally and realize cross ...

Posted by freakstyle on Thu, 03 Feb 2022 06:48:19 +0100

2021-06-10 Android layout

Tip: after the article is written, the directory can be generated automatically. Please refer to the help document on the right for how to generate it Android layout In the Android APP project, there are several layout methods: linear layout, relative layout, flat layout, absolute layout, etc. The most used are linear layout and relativ ...

Posted by theredking on Wed, 02 Feb 2022 07:56:28 +0100

Get the Android source code under Ubuntu and compile it

catalogue background Get source code Install repo Download source zip synchronization compile Install lunch Setting environment compile Use AS to view the source code Compile idegen section Optimize read options View source code epilogue background It is recommended to obtain the Android source code under Linux or Mac, and the h ...

Posted by comtek on Wed, 02 Feb 2022 04:11:44 +0100

Android component design 3 -- advanced usage of kotlinpoet

As a means of generating code by annotation processor, kotlinpool generates Kotlin code in an object-oriented way, which is more in line with the design idea of designers than the write code line by line of EventBus 1. Basic syntax of kotlinpoet First write a piece of Kotlin code class testPoet{ companion object { private const val ...

Posted by bradymills on Wed, 02 Feb 2022 03:41:59 +0100

Advanced knowledge of Android - Android threads and thread pools

The topic of this chapter is threads and thread pools in Android. Thread is a very important concept in Android. In terms of purpose, thread is divided into main thread and sub thread. The main thread mainly deals with things related to the interface, while sub thread is often used to perform time-consuming operations. In addition to the thr ...

Posted by AV1611 on Tue, 01 Feb 2022 23:12:06 +0100