|
@@ -1,27 +1,27 @@
|
|
|
-package com.kdanmobile.reader.screen
|
|
|
+package com.kdanmobile.reader.setting
|
|
|
|
|
|
import android.arch.lifecycle.Observer
|
|
|
import android.arch.lifecycle.ViewModelProviders
|
|
|
-import android.support.v7.app.AppCompatActivity
|
|
|
import android.os.Bundle
|
|
|
+import android.support.v7.app.AppCompatActivity
|
|
|
import android.view.MenuItem
|
|
|
import android.widget.CompoundButton
|
|
|
import com.kdanmobile.reader.R
|
|
|
import com.kdanmobile.reader.screen.model.SharePrefsModel
|
|
|
import com.kdanmobile.reader.screen.view.ReadingModeSelectView
|
|
|
import com.kdanmobile.reader.screen.view.TurnPageModeSelectView
|
|
|
-import kotlinx.android.synthetic.main.activity_viewer_setting.*
|
|
|
+import kotlinx.android.synthetic.main.activity_reader_setting.*
|
|
|
|
|
|
-class ViewerSettingActivity : AppCompatActivity() {
|
|
|
+class ReaderSettingActivity : AppCompatActivity() {
|
|
|
|
|
|
- private lateinit var viewModel: ViewerSettingViewModel
|
|
|
+ private lateinit var viewModel: ReaderSettingViewModel
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
super.onCreate(savedInstanceState)
|
|
|
- setContentView(R.layout.activity_viewer_setting)
|
|
|
+ setContentView(R.layout.activity_reader_setting)
|
|
|
|
|
|
- viewModel = ViewModelProviders.of(this, ViewerSettingViewModelFactory(SharePrefsModel(applicationContext)))
|
|
|
- .get(ViewerSettingViewModel::class.java)
|
|
|
+ viewModel = ViewModelProviders.of(this, ReaderSettingViewModelFactory(SharePrefsModel(applicationContext)))
|
|
|
+ .get(ReaderSettingViewModel::class.java)
|
|
|
|
|
|
viewModel.readMode.observe(this, Observer(this::onReadModeChanged))
|
|
|
viewModel.isCropModeEnable.observe(this, Observer(this::onCropModeEnableChanged))
|