Commit 209d5803 authored by wanglei's avatar wanglei

...

parent ed76d540
...@@ -35,6 +35,7 @@ import com.base.pdfviewerscannerwhite.bean.PdfPageBean ...@@ -35,6 +35,7 @@ import com.base.pdfviewerscannerwhite.bean.PdfPageBean
import com.base.pdfviewerscannerwhite.databinding.ActivityPdfBinding import com.base.pdfviewerscannerwhite.databinding.ActivityPdfBinding
import com.base.pdfviewerscannerwhite.helper.BaseActivity import com.base.pdfviewerscannerwhite.helper.BaseActivity
import com.base.pdfviewerscannerwhite.helper.MyApplication import com.base.pdfviewerscannerwhite.helper.MyApplication
import com.base.pdfviewerscannerwhite.ui.view.PdfDialog.showPdfMoreDialog
import com.base.pdfviewerscannerwhite.utils.KeyBoardUtils.hideKeyboard import com.base.pdfviewerscannerwhite.utils.KeyBoardUtils.hideKeyboard
import com.base.pdfviewerscannerwhite.utils.KeyBoardUtils.showKeyBoard import com.base.pdfviewerscannerwhite.utils.KeyBoardUtils.showKeyBoard
import com.base.pdfviewerscannerwhite.utils.LogEx import com.base.pdfviewerscannerwhite.utils.LogEx
...@@ -119,7 +120,12 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView { ...@@ -119,7 +120,12 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
binding.flGuideGesture.visibility = View.VISIBLE binding.flGuideGesture.visibility = View.VISIBLE
} }
AdmobNativeUtils.showNativeAd(this,binding.flAd,R.layout.layout_admob_document) AdmobNativeUtils.showNativeAd(this, binding.flAd, R.layout.layout_admob_document)
}
override fun jumpPage(pageIndex: Int) {
super.jumpPage(pageIndex)
binding.mupdfReaderView.displayedViewIndex = pageIndex
} }
private fun iniSetVerticalSeekbar(max: Int) { private fun iniSetVerticalSeekbar(max: Int) {
...@@ -247,6 +253,10 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView { ...@@ -247,6 +253,10 @@ class PdfActivity : BaseActivity<ActivityPdfBinding>(), PdfView {
haveGuideGesture = true haveGuideGesture = true
binding.flGuideGesture.visibility = View.GONE binding.flGuideGesture.visibility = View.GONE
} }
binding.ivMore.setOnClickListener {
val count = muPDFCore?.countPages() ?: 0
showPdfMoreDialog(this, count - 1, path)
}
} }
/** /**
......
...@@ -176,7 +176,7 @@ object DialogView { ...@@ -176,7 +176,7 @@ object DialogView {
binding.tvPath.text = file.absolutePath binding.tvPath.text = file.absolutePath
val lastView = SpStringUtils.getSpStringList(LAST_VIEW_KEY).find { it.contains(file.absolutePath) } val lastView = SpStringUtils.getSpStringList(LAST_VIEW_KEY).find { it.contains(file.absolutePath) }
if (lastView != null) { if (lastView != null) {
val lastTime = lastView.split("_")[1] val lastTime = lastView.split("_/_")[1]
binding.tvLastView.text = lastTime.toLong().toFormatTime3() binding.tvLastView.text = lastTime.toLong().toFormatTime3()
} else { } else {
binding.tvLastView.text = file.lastModified().toFormatTime3() binding.tvLastView.text = file.lastModified().toFormatTime3()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment