Kotlin encapsulates universal SharedPreferences to access any type of detail
•
Android
Kotlin encapsulates universal SharedPreferences to access any type of detail
The proxy mode is mainly used here, and the serialized serializable interface should be implemented for the data class. The usage method is as follows:
Note that this statement should be read in the global variable. When you change the value or the value is changed, the value here will be submitted and synchronized by itself.
Thank you for reading, hope to help you, thank you for your support to this site!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码