Differences between let, apply, with and run functions of Kotlin

Rearrange Rearranged the differences of various functions, please move to here. Void below Kotlin has been used for a long time. It only uses simple syntax. Recently, the editor automatically prompts the use of let and other functions in the code written sometimes, and then takes some time to study it. let First, let() is defined as thi ...

Added by tablex on Fri, 11 Feb 2022 06:05:26 +0200

Kotlin's concurrency

Know channel channel is a concurrent and secure queue, which can connect processes and realize the communication of different processes. Several types of channels are defined in the Library. They can store multiple elements internally, but they are different in terms of whether the send call can be suspended. For all Channel types, the behavi ...

Added by geo115fr on Mon, 07 Feb 2022 14:33:32 +0200

Jetpack Compose layout - custom layout

In the first part Quick start of Jetpack Compose Technology In this article, we briefly introduced Compose, so let's learn the layout of Compose. Since the layout involves a lot of content, it will be written separately. The layout mainly includes: Layout Basics,Material components and layout , custom layout Use ConstraintLayout in Compose. ...

Added by gemmerz on Mon, 07 Feb 2022 08:58:42 +0200

Implementation of non blocking echo server by Kotlin NIO

Traditional blocking schemes usually use other threads to process when there are new links, and each thread is responsible for processing a socket, such as ServerSocket serverSocket = new ServerSocket(3000); while(true){ Socket socket = serverSocket.accept(); new Thread(()->{ ...

Added by coelex on Thu, 03 Feb 2022 10:29:21 +0200

Kotlin collaboration with architecture components and underlying principle analysis

I usually read blogs or learn knowledge. What I learned is scattered. There is no independent concept of knowledge module, and it is easy to forget after learning. So I set up my own Note warehouse (a note warehouse I maintain for a long time. If I'm interested, I can click a star ~ your star is a great driving force for my writing). Class ...

Added by [-_-] on Tue, 01 Feb 2022 14:13:11 +0200

Integrated Tencent tbs browsing service x5 kernel

preface: With the improvement of android version, there are some inexplicable bug s in the native webview of android, such as: virtual mouse can't click, h5 compatibility problem, unable to pull up and pull down, pull-up and pull-down conflict, and so on. So I think of using the third-party replacement scheme. The first is the x5 kernel respec ...

Added by gloveny on Fri, 28 Jan 2022 07:53:18 +0200

Kotlin learning - set

List related operations Get elements by index The feature of List is that it can access specific elements through index, so the easiest way to read an element is to retrieve it by index. Pass the index parameters through the get() function or the short syntax [index] All common operations of getting elements by index: elementAt(), first(), l ...

Added by gple on Fri, 28 Jan 2022 04:05:50 +0200

[advanced Android] Kotlin object oriented

introductionIn Kotlin, I can declare ordinary classes, data classes and static classes. It also has abstract classes and interfaces. The abstract keyword can only act on ordinary classes.Classes and objectsGeneral classOrdinary classes in Kotlin are defined through the class keyword. By default, these classes are of final type and cannot be inh ...

Added by rrn on Thu, 27 Jan 2022 15:15:21 +0200

Android DataBinding learning kotlin version

Android DataBinding learning (I): basic application I Introduction to DataBinding DataBinding is a technology officially launched by google to reduce the coupling between UI and business code. The good use of DataBinding can effectively reduce the bloated Activity and save a lot of code use of findViewById. II Basic application 1.gradle ...

Added by 696020 on Wed, 26 Jan 2022 14:44:39 +0200

Gradle+ASM practice -- Thoughts on privacy policy

preface I wrote an introduction to the previous two articles: Gradle plug-in + ASM practice - Introduction and Gradle+ASM actual combat - advanced level , those who are not familiar with gradle+ASM can go to the previous article to check github address: https://github.com/Peakmain/AsmActualCombat Demand background The new company was replace ...

Added by dodginess on Mon, 24 Jan 2022 15:44:14 +0200