.
This commit is contained in:
parent
536e917b29
commit
0232c9dad0
@ -1,8 +1,10 @@
|
||||
package com.mime.dualscreenview.activity
|
||||
|
||||
import android.content.ComponentName
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.pm.PackageManager.NameNotFoundException
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Bitmap
|
||||
import android.net.Uri
|
||||
@ -17,7 +19,8 @@ import android.util.Log
|
||||
import android.view.Gravity
|
||||
import android.view.KeyEvent
|
||||
import android.view.View
|
||||
import android.view.View.*
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.webkit.WebSettings
|
||||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
@ -29,7 +32,6 @@ import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.widget.AppCompatButton
|
||||
import androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
import com.google.gson.Gson
|
||||
import com.mime.dualscreenview.R
|
||||
@ -51,7 +53,6 @@ import com.mime.dualscreenview.view.PagedTextViewInterface
|
||||
import com.mime.dualscreenview.view.TouchArea
|
||||
import com.mime.dualscreenview.webcontents.BaseWebContentsViewer
|
||||
import com.mime.dualscreenview.webcontents.MainControllInterface
|
||||
import com.mime.dualscreenview.webcontents.contentsinfo.Agit
|
||||
import com.mime.dualscreenview.webcontents.contentsinfo.Booktoki
|
||||
import com.mime.dualscreenview.webcontents.contentsinfo.GotoSomeWhere
|
||||
import io.realm.kotlin.UpdatePolicy
|
||||
@ -136,6 +137,32 @@ class Intro : Base() , MainControllInterface, PagedTextViewInterface {
|
||||
// }
|
||||
|
||||
findViewById<View>(R.id.btn_setting).setOnClickListener { v->
|
||||
// var intent = Intent()
|
||||
// var findIntent = Intent(Intent.ACTION_MAIN,null)
|
||||
// var list = packageManager.queryIntentActivities(findIntent,0)
|
||||
// list.forEach {
|
||||
// Blog.LOGE("activityInfo ============START================")
|
||||
// val pm = applicationContext.packageManager
|
||||
// var ai = try {
|
||||
// pm.getApplicationInfo(it.activityInfo.packageName, 0)
|
||||
// } catch (e: NameNotFoundException) {
|
||||
// null
|
||||
// }
|
||||
// val applicationName =
|
||||
// (if (ai != null) pm.getApplicationLabel(ai) else "(unknown)") as String
|
||||
// Blog.LOGE("applicationName ============:: ${applicationName} ::================")
|
||||
// Blog.LOGE("it.activityInfo.processName ::=> ${it.activityInfo.processName}")
|
||||
// Blog.LOGE("it.activityInfo.targetActivity ::=> ${it.activityInfo.targetActivity}")
|
||||
// Blog.LOGE("it.activityInfo.name ::=> ${it.activityInfo.name}")
|
||||
// Blog.LOGE("it.activityInfo.packageName ::=> ${it.activityInfo.packageName}")
|
||||
// Blog.LOGE("it.resolvePackageName ::=> ${it.resolvePackageName}")
|
||||
// Blog.LOGE("activityInfo ============END================")
|
||||
// }
|
||||
//
|
||||
//
|
||||
// var startIntene = Intent(Intent.ACTION_MAIN)
|
||||
// startIntene.setComponent(ComponentName("com.samsung.android.app.interpreter","com.samsung.android.app.interpreter.interpretation.view.InterpretationActivity"))
|
||||
// startActivity(startIntene)
|
||||
startActivity(Intent(this@Intro, Settings::class.java))
|
||||
}
|
||||
findViewById<View>(R.id.btn_history).setOnClickListener { v->
|
||||
@ -235,8 +262,18 @@ class Intro : Base() , MainControllInterface, PagedTextViewInterface {
|
||||
}
|
||||
},200L)
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
proceedLastPage()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
}
|
||||
|
||||
|
||||
fun proceedLastPage() {
|
||||
var realm = HistoryManager.openRealm()
|
||||
realm.query<ReaderConfig>()?.find()?.let {
|
||||
if (it.size > 0) {
|
||||
@ -252,6 +289,7 @@ class Intro : Base() , MainControllInterface, PagedTextViewInterface {
|
||||
reloadLastInfo()
|
||||
reloadTo(lastInfo)
|
||||
}
|
||||
|
||||
fun switcvhOrient(){
|
||||
// val configuration: Configuration = getResources().getConfiguration()
|
||||
// setRequestedOrientation(
|
||||
|
||||
@ -4,7 +4,7 @@ import com.mime.dualscreenview.webcontents.BaseWebContents
|
||||
|
||||
object Booktoki : BaseWebContents() {
|
||||
|
||||
override var lastNumber : Int = 347
|
||||
override var lastNumber : Int = 348
|
||||
|
||||
override fun getWebcontentsName(): String {
|
||||
return "Booktoki"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user