Skip to content

Commit

Permalink
onCreateViewModel 方法权限更改
Browse files Browse the repository at this point in the history
  • Loading branch information
keepactive committed Jul 10, 2021
1 parent a17e182 commit b389b21
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ BaseFrag<VM : BaseViewModel?>(private val contentLayoutId: Int = 0) :
* 为什么有这个方法, 是因为 Fragment 可以通过挂载的 Activity 或者 自身Fragment 创建不同作用域的 ViewModel.
* 所以把这个选择交给了子类去实现
*/
protected fun onCreateViewModel(): VM? {
protected open fun onCreateViewModel(): VM? {
return null
}

Expand Down

0 comments on commit b389b21

Please sign in to comment.