From e29e6fcbaa323af6ef1e024305a455c75ac3a54b Mon Sep 17 00:00:00 2001 From: GKF Date: Fri, 31 May 2019 09:16:07 +0800 Subject: [PATCH] up aboutActivity --- .../java/io/legado/app/ui/about/AboutActivity.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt b/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt index 4e47cc604..150e8a027 100644 --- a/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt +++ b/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt @@ -1,13 +1,19 @@ package io.legado.app.ui.about import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity +import androidx.lifecycle.AndroidViewModel import io.legado.app.R +import io.legado.app.base.BaseActivity +import io.legado.app.utils.getViewModel -class AboutActivity : AppCompatActivity() { +class AboutActivity : BaseActivity() { + override val viewModel: AndroidViewModel + get() = getViewModel(AndroidViewModel::class.java) + override val layoutID: Int + get() = R.layout.activity_about - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_about) + override fun onViewModelCreated(viewModel: AndroidViewModel, savedInstanceState: Bundle?) { + super.onViewModelCreated(viewModel, savedInstanceState) } + }