[kotlin] null pointer check in kotlin

kotlin learning - null pointer check 1.Java In java code, null pointer errors are often reported, methods pass parameters, operate on data, or call collections. The general operation is to add a null judgment process 2.kotlin nullable type system **In kotlin, all parameters and variables cannot be null by default, * * if NULL is passed, ...

Posted by kitegirl on Sat, 15 Jan 2022 00:31:42 +0100

Customize the View and draw the Android radar map with Kotlin

stay Custom View and Radar chart Based on the two blogs, I have made some modifications. Here I summarize my own learning experience. There are several ways to customize the View typedefinitionCustom composite controlMultiple controls are combined into a new control to facilitate multiple reuseInherit system View controlIt inherits from TextV ...

Posted by not_skeletor on Fri, 14 Jan 2022 21:46:18 +0100

[kotlin] kotlin's basic grammar

kotlin learning - basic grammar 1. Introduction Compare java 1. Simple syntax and less code 2. Advanced Grammar 3. Language security. Eliminate null pointers 4. 100% compatible with Java 2. Operation Online website: https://play.kotlinlang.org/ val immutable = final var non final var a =10 (automatic derivation type) No semicol ...

Posted by arimakidd on Fri, 14 Jan 2022 21:31:43 +0100

Kotlin collaboration 5 - using kotlin collaboration in Android

Kotlin collaboration series article navigation: Kotlin process I - Coroutine Kotlin collaboration process 2 - Channel Kotlin collaboration process III - data Flow Kotlin collaboration process IV -- Application of Flow and Channel Kotlin collaboration 5 - using kotlin collaboration in Android 1, Android MVVM architecture Architecture diagram of ...

Posted by blindSpot on Fri, 14 Jan 2022 20:49:00 +0100

Android project architecture design in simple terms

Author Pu KeThis paper introduces how to design the architecture of a large Android project from 0 to 1.One guideThis article is long and can be combined with the following table to guide you to quickly understand the main context of the full text.II. Project architecture evolutionThis chapter mainly summarizes the evolution process of an Andro ...

Posted by PHP Newb on Sat, 08 Jan 2022 20:22:55 +0100

Technical reconstruction and practice of Swift in hand Amoy commodity evaluation

Author: Wang Zhejian (Zhejian) After a month and a half of technical reconstruction, several months of iteration and volume, the new version of the commodity evaluation list of hand Amoy finally completed the whole process with 100% traffic stability on the double 11 in 2021. We have not only made a clear improvement in business, but also pr ...

Posted by snpo123 on Thu, 06 Jan 2022 10:30:10 +0100

Interesting, I found a magical bug in Kotlin!

1. ForewordThis article will introduce a bug in Kotlin from simple to deep through specific business scenarios, tell you the magic of the bug, then lead you to find the cause of the bug, and finally avoid the bug.2. bug recurrenceIn real development, we often have the problem of deserializing the Json string into an object. Here, we use Gson to ...

Posted by Madatan on Thu, 06 Jan 2022 08:11:42 +0100

Channel practice of Kotlin

passagewayKnow ChannelCapacity and iterationProduction and actorChannel shutdownBroadcastChannelMultiplexingWhat is multiplexingMultiplexing multiple await sMultiplexing multiple channelsSelectClauseFlow multiplexingConcurrent securityConcurrent tools for collaborative processesMutexSemaphoreKnow ChannelChannel is actually a concurrent secure q ...

Posted by cillosis on Thu, 06 Jan 2022 07:27:19 +0100

You should know kotlin's practical skills

prefaceAs we all know, kotlin is an android development language pushed by google to replace java kotlin is easy to use and has a lot of grammar This paper mainly explains some practical kotlin skillsCustom rounded rectangleIn projects, we often define rounded rectangular backgrounds, which are generally implemented with custom drawable Howe ...

Posted by vickie on Wed, 05 Jan 2022 20:56:53 +0100

Kotlin knowledge points Summary - Basic

Kotlin knowledge points Summary - Basic 1, Data type 1.1 definition of basic data type val anInt: Int = 8 val aLong: Long = 12368172397127391 val aFloat: Float = 2.0F val aDouble: Double = 3.0 val aShort: Short = 127 val maxByte: Byte = Byte.MAX_VALUE //Delay initializing lateinit without assignment lateinit var s:String 1.2 template ...

Posted by geraldpolar on Wed, 05 Jan 2022 12:13:50 +0100