Przeglądaj źródła

Turn off annotation mode when click setting

Wayne 4 lat temu
rodzic
commit
85faedaaed

+ 13 - 9
src/main/java/com/kdanmobile/reader/ReaderActivity.kt

@@ -4,26 +4,29 @@ import android.annotation.SuppressLint
 import android.app.Activity
 import android.app.Dialog
 import android.content.Context
-import androidx.lifecycle.Observer
 import android.content.Intent
 import android.net.Uri
 import android.os.Build
 import android.os.Bundle
-import androidx.constraintlayout.widget.ConstraintLayout
-import androidx.constraintlayout.widget.ConstraintSet
-import com.google.android.material.snackbar.Snackbar
-import androidx.core.content.ContextCompat
-import androidx.appcompat.app.AlertDialog
 import android.util.DisplayMetrics
 import android.view.*
 import android.view.animation.AnimationUtils
 import android.widget.*
+import androidx.appcompat.app.AlertDialog
+import androidx.constraintlayout.widget.ConstraintLayout
+import androidx.constraintlayout.widget.ConstraintSet
+import androidx.core.content.ContextCompat
+import androidx.lifecycle.Observer
+import com.google.android.material.snackbar.Snackbar
 import com.kdanmobile.base.KdanBaseActivity
-import com.kdanmobile.kmpdfkit.pdfcommon.PDFInfo
 import com.kdanmobile.kmpdfkit.manager.KMPDFFactory
-import com.kdanmobile.kmpdfkit.pdfcommon.*
+import com.kdanmobile.kmpdfkit.pdfcommon.FilePicker
+import com.kdanmobile.kmpdfkit.pdfcommon.KMPDFPageAdapter
+import com.kdanmobile.kmpdfkit.pdfcommon.PDFInfo
 import com.kdanmobile.reader.Utils.applyConstraintSet
-import com.kdanmobile.reader.additionalpage.*
+import com.kdanmobile.reader.additionalpage.AdditionalPageDisplayStrategyType
+import com.kdanmobile.reader.additionalpage.AdditionalPageManager
+import com.kdanmobile.reader.additionalpage.AdditionalPageReaderView
 import com.kdanmobile.reader.annotationattribute.AnnotationAttribute
 import com.kdanmobile.reader.annotationattribute.AnnotationColor
 import com.kdanmobile.reader.annotationattribute.InkAttribute
@@ -920,6 +923,7 @@ abstract class ReaderActivity :
 
     private fun setupRightSideToolbar() {
         iv_readerActivity_setting.setOnClickListener {
+            viewModel.stopAnnotationMode()
             val settingDialog = provideReaderSettingDialogFragment()
             settingDialog.show(supportFragmentManager, FRAGMENT_READER_SETTING_TAG)
         }