Android project process, see Anko library asynchronous framework doAsync() and uiThread() method, although currently Kotlin coroutine is a better asynchronous solution, but I as a...
In our last article, we revisited Kotlin's forms, especially our understanding and use of covariant and contravariance. As we know, the main purpose of typecasting...
RecyclerView as Android list items display components. Compared to ListView, the caching mechanism is more detailed to improve the fluency. Space for time
The role of the foreword Builder pattern: It separates the construction of a complex object from its representation, so that the same construction process can...
Kotlin Basic data types and data operations: Basic numeric types Floating point type Character Type String Type Forcible conversion Number operation 1. Basic data types:...
Annotation processing is a powerful tool for generating code for Java programs. In this article, you'll develop an annotation and an annotation handler that automatically...
This is the third article in Kotlin's series on function enhancement. Higher-order functions (functions that use a function as an argument to a function or...
For an Android developer, using Kotlin as the primary development language, coroutines are an essential asynchronous framework. This article will be combined with the actual...
What is Kotlin? Kotlin is a static programming language for modern multi-platform applications, developed by JetBrains. Kotlin can be compiled to Java bytecode or JavaScript,...
The enumeration and sealing classes in Kotlin are duplicated. How should I choose between them? This article introduces the comparison of the two aspects, so...
This is the seventh day of my participation in the First Challenge 2022. For details: First Challenge 2022. This article covers Kotlin's data classes, sealed...
In the previous section, the detailed class (class) did an example explanation, mentioned the class (class) instantiation, constructor, declaration, implementation, and Java class differences. But...
In the previous sections, the data classes, sealed classes, interface classes, and enumeration classes of the Kotlin class were described in detail. In this chapter,...
It's easy to think of the delegate model, which is essentially delegating operations to another party to perform. In Java, delegation is only limited to...
LiveData is an observable data storage class with autonomous lifecycle awareness dedicated to Android. It is intentionally simplified in design to make it easy for...
Spannable in Android development to achieve rich text display, is also a relatively common use scenario, such as in the login page display "privacy Policy",...
== in Kotlin is equivalent to calling equals. Unlike Java, Kotlin has strict validation when making size comparisons. Different data types cannot be compared. (at...
This article mainly explains constants and variables, branch expressions, operators and infix expressions, Lambda expressions, case: Implement equals and hashCode for Person, case: implement four...
This article mainly explains higher-order functions, inline functions, several useful higher-order functions, set transformation and sequence, SAM transformation, case: count the number of characters, case:...