Articles on listening Activity life cycle in two ways: add fragments and registerActivityLifecycleCallback and in lifecycle, Glide, PermissionX applications
1. Nested functions; 2.@JvmOverloads quick implementation of function overloading 3. Late initialization 'lateinit var' 4.@JvmField reduces the generation of attribute set and get methods
Manually build GradientDrawable instead of XML shape. The background of the original XML implementation has two drawbacks: 1. The number of XML files in the resource path is too large and it is difficult to manage. 2. Parsing XML files involves I/O, which increases the parsing time
Kotlin on constructors, associated objects and there are some things in Kotlin that seem pretty simple, like we can use them without any problems, right? But that doesn't mean we understand these are just points, we just know how to use them, and to understand them, we need to understand them, right
The prologue coroutine is a difficult concept in Kotlin and one of the most important features of its language. The concept of coroutines was not invented by Kotlin. It was proposed a long time ago, but it has been around for the last decade, especially in Python, Go and other languages that support coroutines
With more and more Android development using Kotlin, and the ongoing feud between Google and Oracle, it's a foregone conclusion that Kotlin will become the dominant language for Android development. At the same time kotlin as
However, many of the functions of Flow can be replaced by RxJava. However, Flow provides a more straightforward API than RxJava. Moreover, G
Kotlin coroutine context is used to retry network request errors. Automatic retry coroutines CoroutineExceptionHandler context, the network failure
Kotlin calls Java nullability All Java objects are nullable, but the compiler doesn't know it. Therefore, Kotlin cannot perform security checks at compile time. The nullable type returned by Java is called the platform type String! What if you don't use the security operator?
I inadvertently paid attention to the public account of Non-code Technology before, from which I know their first product Readhub, the address of which is https://readhub.me/, mainly provides the latest news of the Internet. After paying attention for a period of time, I feel that the content quality is good, which can help us filter out some junk information. But it can only be viewed in the browser and wechat public account, plus its own...