From 433440609ea86527a5c26f02ec0e778ebbd7b6b6 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 11 Aug 2019 17:21:29 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/bookinfo/BookInfoActivity.kt | 7 +++++-- .../java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt index 314a76cf4..b7c553c85 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt @@ -2,9 +2,12 @@ package io.legado.app.ui.bookinfo import android.os.Bundle import io.legado.app.R -import io.legado.app.base.BaseActivity +import io.legado.app.base.VMBaseActivity +import io.legado.app.utils.getViewModel -class BookInfoActivity : BaseActivity(R.layout.activity_book_info) { +class BookInfoActivity : VMBaseActivity(R.layout.activity_book_info) { + override val viewModel: BookInfoViewModel + get() = getViewModel(BookInfoViewModel::class.java) override fun onActivityCreated(savedInstanceState: Bundle?) { diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt new file mode 100644 index 000000000..687c04350 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoViewModel.kt @@ -0,0 +1,9 @@ +package io.legado.app.ui.bookinfo + +import android.app.Application +import io.legado.app.base.BaseViewModel + +class BookInfoViewModel(application: Application) : BaseViewModel(application) { + + +} \ No newline at end of file