Author: stars one Reprint address: https://juejin.cn/post/7128993794283798536
The Jetpack architecture recommends the use of MVVM structure. For this reason, several MVVM component libraries have been launched for our developers to quickly access. The first thing to talk about is ViewModel
Personal understanding: Activity is View, VM is ...
Posted by hassanz25 on Wed, 17 Aug 2022 10:50:46 +0300
1, lateinit delay initialization keyword
Many syntax features in Kotlin, such as variable immutability, variable non nullability, and so on, are designed to ensure program safety as much as possible. For example, there are many global variable instances in your class. In order to ensure that they can meet Kotlin's null pointer check sta ...
backgroundDuring SDK development, the interface for obtaining the SDK version number is generally exposed. The obtained version number is generally of String type, such as:// sdk interface
interface Sdk {
fun getVersion(): String
}
// sdk caller
sdk.getVersion()The above method can be through gradle Configure the version number in properti ...
Posted by henrygao on Mon, 23 May 2022 19:19:51 +0300
Chapter 1 Introduction to Android
as is based on idea. No wonder it's so similar
proguard-rules.pro is a file that specifies the confusion rules of the project code (confusion is that the project is typed into an installation package and does not want to be cracked, so as to confuse and make it difficult for the cracker to read)
gradle is base ...
Posted by dpacmittal on Thu, 19 May 2022 14:19:03 +0300
1, Request network using HttpURLConnection
HttpURLConnection use
First, you need to get the instance of HttpURLConnection. Generally, you only need to create a URL object, pass in the network address of the target, and then call the following openConnection() method.
As follows:
val url = URL("https://www.baidu.com.com "); / / pass in a ta ...
Posted by NikkiLoveGod on Sun, 15 May 2022 14:55:05 +0300
Don't complain when you encounter difficulties. Since you can't change the past, try to change the future.
1, Overview
there are some common attribute types. Although we can implement them manually every time we need them, it is best to implement them in the library at one time. For example:
Delay attribute: the value is cal ...
Posted by coverman on Fri, 06 May 2022 02:34:53 +0300
*Specific conditions and circumstancesThis blog describes an experimental feature of Kotlin, which is still being adjusted. This article is based on Kotlin 1.3.50.
Type safety helps us prevent errors and avoid going back to debugging errors. For Android resource files, such as String, Font or Animation resources, we can use Android X Annotatio ...
Posted by Worqy on Thu, 05 May 2022 10:45:28 +0300
1 Introduction
Proposed to be completed in this subsection Conditional Navigation case. The specific logic is:
There are a total of three Fragment s, which are the home page that visitors can view, the details that can only be viewed after logging in, and the login page.After the user enters the home page, if the user clicks to jump to th ...
Posted by paul_20k on Tue, 03 May 2022 04:32:59 +0300
preface: Kotlin is an extremely flexible language, which is a double-edged sword. Compared with Java, we all write in vernacular. Regardless of the level, we can basically read each other's code very smoothly. However, after using kotlin, due to the different expression level and thinking habits of kotlin, we can create such a situation, " ...
Posted by jonathandg on Tue, 26 Apr 2022 23:31:09 +0300
I am also a beginner of Kotlin. If there are any mistakes, please help me point them out and update them continuously
Android: Kotlin detailed introductory Learning Guide - functions - Basic Grammar (6)
I suggest you look at the previous article first Android: Kotlin detailed introductory Learning Guide - Basic Grammar (I) Android: Kotlin det ...
Posted by xfezz on Mon, 25 Apr 2022 14:34:23 +0300