![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
kotlin
文章平均质量分 66
ydjjcdd
这个作者很懒,什么都没留下…
展开
-
LiveDate、ViewModel、Activity之间的关系
1、主要依托 ComponentActivity 来讲它们之间的关系2、Activity实现的mvvm相关接口 LifecycleOwner, ViewModelStoreOwner, HasDefaultViewModelProviderFactory, SavedStateRegistryOwner,3LiveData和Activity的关系主要还是通过Actvity获取到Activiry的Lifecycle,并将原创 2021-11-12 10:14:45 · 1204 阅读 · 0 评论 -
LiveData结合协程使用-LiveDataScope文档注释
/* * Copyright 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.原创 2021-09-23 17:53:41 · 762 阅读 · 0 评论 -
kotlin协程相关类之间的关系
一、相关类图弄清协程一些类和接口的关系,有助于大家整体对协程的理解二、相关类概述协程作用域 协程上下文 协程的分发器 协程的构建器 Job 协程和线程的关系三、相关类之间的关系通过一个简单的示例简述上面相关类的关系一个协程作用域,以CoroutineSope为例,包含了一个协程的上下文CoroutineContext,协程fen...原创 2021-08-04 01:24:41 · 299 阅读 · 0 评论