From 0fe6f83f6efff3b9acf1db228ec85d4cf3c9bade Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 14 Aug 2019 20:21:28 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/bookinfo/BookInfoActivity.kt | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ee34a35f0..b1275721f 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 @@ -8,6 +8,7 @@ import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.data.entities.Book import io.legado.app.help.ImageLoader +import io.legado.app.ui.changesource.ChangeSourceDialog import io.legado.app.utils.getViewModel import io.legado.app.utils.gone import io.legado.app.utils.visible @@ -20,6 +21,8 @@ class BookInfoActivity : VMBaseActivity(R.layout.activity_boo override val viewModel: BookInfoViewModel get() = getViewModel(BookInfoViewModel::class.java) + var changeSourceDialog: ChangeSourceDialog? = null + override fun onActivityCreated(savedInstanceState: Bundle?) { setSupportActionBar(toolbar) viewModel.bookData.observe(this, Observer { showBook(it) }) @@ -114,5 +117,11 @@ class BookInfoActivity : VMBaseActivity(R.layout.activity_boo } } tv_loading.onClick { } + tv_change_source.onClick { + if (changeSourceDialog == null) { + changeSourceDialog = ChangeSourceDialog() + } + changeSourceDialog?.show(supportFragmentManager, "changeSource") + } } } \ No newline at end of file