...
This commit is contained in:
parent
a00b2764b0
commit
b5ad079439
@ -79,11 +79,12 @@
|
||||
android:requestLegacyExternalStorage="true"
|
||||
>
|
||||
<!-- android:excludeFromRecents="true"-->
|
||||
<!-- portrait|reversePortrait|userPortrait|sensorPortrait-->
|
||||
<activity
|
||||
android:name=".LauncherActivity"
|
||||
android:theme="@style/Theme.LunarLauncher.Starting"
|
||||
android:launchMode="singleInstance"
|
||||
|
||||
android:screenOrientation="userPortrait"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|screenLayout|layoutDirection"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:exported="true">
|
||||
@ -99,54 +100,54 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".apps.AppDrawer"
|
||||
android:label="@string/lunar_settings"
|
||||
android:launchMode="singleTask"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- <activity-->
|
||||
<!-- android:name=".apps.AppDrawer"-->
|
||||
<!-- android:label="@string/lunar_settings"-->
|
||||
<!-- android:launchMode="singleTask"-->
|
||||
<!-- android:excludeFromRecents="true"-->
|
||||
<!-- android:exported="true">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.APPLICATION_PREFERENCES" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </activity>-->
|
||||
|
||||
<activity
|
||||
android:name=".tokiz.Settings"
|
||||
android:label="@string/lunar_settings"
|
||||
android:launchMode="singleInstance"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="true">
|
||||
<!-- <activity-->
|
||||
<!-- android:name=".tokiz.Settings"-->
|
||||
<!-- android:label="@string/lunar_settings"-->
|
||||
<!-- android:launchMode="singleInstance"-->
|
||||
<!-- android:excludeFromRecents="true"-->
|
||||
<!-- android:exported="true">-->
|
||||
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".settings.SettingsActivity"
|
||||
android:label="@string/lunar_settings"
|
||||
android:launchMode="singleTask"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".behavior.Behavior"
|
||||
android:label="@string/lunar_settings"
|
||||
android:launchMode="singleTask"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- </activity>-->
|
||||
<!-- <activity-->
|
||||
<!-- android:name=".settings.SettingsActivity"-->
|
||||
<!-- android:label="@string/lunar_settings"-->
|
||||
<!-- android:launchMode="singleTask"-->
|
||||
<!-- android:excludeFromRecents="true"-->
|
||||
<!-- android:exported="true">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.APPLICATION_PREFERENCES" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </activity>-->
|
||||
<!-- <activity-->
|
||||
<!-- android:name=".behavior.Behavior"-->
|
||||
<!-- android:label="@string/lunar_settings"-->
|
||||
<!-- android:launchMode="singleTask"-->
|
||||
<!-- android:excludeFromRecents="true"-->
|
||||
<!-- android:exported="true">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.APPLICATION_PREFERENCES" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </activity>-->
|
||||
|
||||
<receiver android:name=".helpers.HeadsetActionButtonReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true" >
|
||||
<intent-filter
|
||||
android:priority="2147483647">
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<!-- <receiver android:name=".helpers.HeadsetActionButtonReceiver"-->
|
||||
<!-- android:enabled="true"-->
|
||||
<!-- android:exported="true" >-->
|
||||
<!-- <intent-filter-->
|
||||
<!-- android:priority="2147483647">-->
|
||||
<!-- <action android:name="android.intent.action.MEDIA_BUTTON"/>-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
|
||||
<!-- <service android:name=".MediaButtonService"-->
|
||||
<!-- android:exported="true">-->
|
||||
@ -161,52 +162,52 @@
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:exported="false"/>
|
||||
|
||||
<service
|
||||
android:name=".helpers.LockService"
|
||||
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.accessibilityservice.AccessibilityService" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.accessibilityservice"
|
||||
android:resource="@xml/lock_service" />
|
||||
</service>
|
||||
<!-- <service-->
|
||||
<!-- android:name=".helpers.LockService"-->
|
||||
<!-- android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"-->
|
||||
<!-- android:exported="false">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.accessibilityservice.AccessibilityService" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="android.accessibilityservice"-->
|
||||
<!-- android:resource="@xml/lock_service" />-->
|
||||
<!-- </service>-->
|
||||
|
||||
<receiver
|
||||
android:name=".helpers.AdminReceiver"
|
||||
android:label="@string/app_name"
|
||||
android:description="@string/device_admin_description"
|
||||
android:permission="android.permission.BIND_DEVICE_ADMIN"
|
||||
android:exported="false">
|
||||
<meta-data
|
||||
android:name="android.app.device_admin"
|
||||
android:resource="@xml/device_admin" />
|
||||
<intent-filter>
|
||||
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<!-- <receiver-->
|
||||
<!-- android:name=".helpers.AdminReceiver"-->
|
||||
<!-- android:label="@string/app_name"-->
|
||||
<!-- android:description="@string/device_admin_description"-->
|
||||
<!-- android:permission="android.permission.BIND_DEVICE_ADMIN"-->
|
||||
<!-- android:exported="false">-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="android.app.device_admin"-->
|
||||
<!-- android:resource="@xml/device_admin" />-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
|
||||
<activity
|
||||
android:name=".home.RssViewerActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTask"
|
||||
android:exported="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:theme="@style/FinestWebViewTheme.Fullscreen" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:scheme="file"/>
|
||||
<data android:scheme="content"/>
|
||||
<data android:mimeType="text/html"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
<data android:mimeType="text/xml"/>
|
||||
<data android:mimeType="application/xhtml+xml"/>
|
||||
<data android:mimeType="application/vnd.wap.xhtml+xml"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- <activity-->
|
||||
<!-- android:name=".home.RssViewerActivity"-->
|
||||
<!-- android:configChanges="keyboardHidden|orientation|screenSize"-->
|
||||
<!-- android:hardwareAccelerated="true"-->
|
||||
<!-- android:launchMode="singleTask"-->
|
||||
<!-- android:exported="true"-->
|
||||
<!-- android:excludeFromRecents="true"-->
|
||||
<!-- android:theme="@style/FinestWebViewTheme.Fullscreen" >-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.VIEW" />-->
|
||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
||||
<!-- <data android:scheme="file"/>-->
|
||||
<!-- <data android:scheme="content"/>-->
|
||||
<!-- <data android:mimeType="text/html"/>-->
|
||||
<!-- <data android:mimeType="text/plain"/>-->
|
||||
<!-- <data android:mimeType="text/xml"/>-->
|
||||
<!-- <data android:mimeType="application/xhtml+xml"/>-->
|
||||
<!-- <data android:mimeType="application/vnd.wap.xhtml+xml"/>-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </activity>-->
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
@ -218,55 +219,55 @@
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
<service android:name=".receiver.NLService"
|
||||
android:label="@string/app_name"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
|
||||
<intent-filter>
|
||||
<action android:name="android.service.notification.NotificationListenerService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="bums.lunatic.launcher.workers.LocationUpdateService" />
|
||||
<!-- <service android:name=".receiver.NLService"-->
|
||||
<!-- android:label="@string/app_name"-->
|
||||
<!-- android:enabled="true"-->
|
||||
<!-- android:exported="true"-->
|
||||
<!-- android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.service.notification.NotificationListenerService" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </service>-->
|
||||
<!-- <service android:name="bums.lunatic.launcher.workers.LocationUpdateService" />-->
|
||||
|
||||
<receiver android:name=".LauncherActivity$EndCallReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PHONE_STATE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".LauncherActivity$SMSReceiver"
|
||||
android:exported="true"
|
||||
android:enabled="true"
|
||||
android:permission="android.permission.BROADCAST_SMS">
|
||||
<intent-filter>
|
||||
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
|
||||
<action android:name="android.provider.Telephony.MMS_RECEIVED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<!-- <receiver android:name=".LauncherActivity$EndCallReceiver"-->
|
||||
<!-- android:enabled="true"-->
|
||||
<!-- android:exported="true">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.PHONE_STATE" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
<!-- <receiver android:name=".LauncherActivity$SMSReceiver"-->
|
||||
<!-- android:exported="true"-->
|
||||
<!-- android:enabled="true"-->
|
||||
<!-- android:permission="android.permission.BROADCAST_SMS">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.provider.Telephony.SMS_RECEIVED" />-->
|
||||
<!-- <action android:name="android.provider.Telephony.MMS_RECEIVED" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
|
||||
<receiver
|
||||
android:exported="true"
|
||||
android:enabled="true"
|
||||
android:name=".receiver.PackageEventReceiver"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_INSTALL"/>
|
||||
<action android:name="android.intent.action.PACKAGE_ADDED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_CHANGED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_DATA_CLEARED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_FIRST_LAUNCH"/>
|
||||
<action android:name="android.intent.action.PACKAGE_FULLY_REMOVED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_INSTALL"/>
|
||||
<action android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REMOVED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_RESTARTED"/>
|
||||
<action android:name="android.intent.action.PACKAGE_VERIFIED"/>
|
||||
<data android:scheme="package" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<!-- <receiver-->
|
||||
<!-- android:exported="true"-->
|
||||
<!-- android:enabled="true"-->
|
||||
<!-- android:name=".receiver.PackageEventReceiver"-->
|
||||
<!-- >-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_REPLACED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_INSTALL"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_ADDED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_CHANGED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_DATA_CLEARED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_FIRST_LAUNCH"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_INSTALL"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_REMOVED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_REPLACED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_RESTARTED"/>-->
|
||||
<!-- <action android:name="android.intent.action.PACKAGE_VERIFIED"/>-->
|
||||
<!-- <data android:scheme="package" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
</application>
|
||||
</manifest>
|
||||
3029
app/src/main/assets/extensions/my_extension/fdfdfdf.html
Normal file
3029
app/src/main/assets/extensions/my_extension/fdfdfdf.html
Normal file
File diff suppressed because one or more lines are too long
@ -45,20 +45,62 @@ port.onMessage.addListener(response => {
|
||||
else scrollByPercentUpDown(Number(isUpDown),100);
|
||||
}
|
||||
break;
|
||||
case "ViewerTouch": {
|
||||
if (document.querySelector(".show_viewer")) {
|
||||
var area = response["area"]
|
||||
var current = Number(document.querySelector("#mcv_currentPageNum").innerHTML)
|
||||
var total = Number(document.querySelector("#mcv_totalPagesNum").innerHTML)
|
||||
|
||||
if ("left" === area) {
|
||||
if (current > 0) {
|
||||
document.querySelector("#mcv_clickAreaRight").click()
|
||||
} else {
|
||||
document.querySelector("#goPrevBtn").click()
|
||||
}
|
||||
} else if ("right" === area) {
|
||||
if (current < total) {
|
||||
document.querySelector("#mcv_clickAreaLeft").click()
|
||||
}else {
|
||||
document.querySelector("#goNextBtn").click()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "onLoaded":{
|
||||
|
||||
}
|
||||
break;
|
||||
case "saveContent":{
|
||||
sendMessage(
|
||||
{
|
||||
type: "SHOWVIEWER",
|
||||
contents : document.documentElement.outerHTML
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
default:
|
||||
port.postMessage(`Received: ${JSON.stringify(response)}`);
|
||||
break
|
||||
}
|
||||
});
|
||||
if(document.querySelector(".list-body")) {
|
||||
if (document.location.href.search("reddit") > -1) {
|
||||
if (document.querySelector('#xpromo-bottom-sheet')) {
|
||||
document.querySelector('#xpromo-bottom-sheet').remove()
|
||||
}
|
||||
}
|
||||
if (document.querySelector(".show_viewer") !== null) {
|
||||
document.querySelector(".show_viewer").click();
|
||||
sendMessage({type: "SHOWVIEWER"});
|
||||
}
|
||||
if(document.querySelector(".list-body") !== null) {
|
||||
var listBody = null
|
||||
try {listBody = document.querySelector(".list-body");}catch (e) {}
|
||||
getList(listBody.children)
|
||||
} else if(document.querySelector("#novel_content")){
|
||||
}
|
||||
if(document.querySelector("#novel_content") !== null){
|
||||
var title = null
|
||||
var contents = null
|
||||
try {title = toonTitle(document.querySelector(".page-desc")); }catch (e) {}
|
||||
@ -74,16 +116,18 @@ if(document.querySelector(".list-body")) {
|
||||
}
|
||||
);
|
||||
}
|
||||
} else if(document.querySelector("#html_encoder_div")) {
|
||||
}
|
||||
if(document.querySelector("#html_encoder_div")) {
|
||||
sendMessage(
|
||||
{
|
||||
type: "WebtoonContents",
|
||||
}
|
||||
);
|
||||
} else {
|
||||
sendMessage({type:"MSG",msg:"connected has Nothings"});
|
||||
loadComplete()
|
||||
}
|
||||
// else {
|
||||
// sendMessage({type:"MSG",msg:"connected has Nothings"});
|
||||
// loadComplete()
|
||||
// }
|
||||
|
||||
|
||||
function getList(children) {
|
||||
@ -93,9 +137,29 @@ function getList(children) {
|
||||
for (i= 0; i < maxCount; i++) {
|
||||
var chapterNum = children[i].getElementsByClassName('wr-num')[0].textContent;
|
||||
var pageUrl = children[i].getElementsByClassName('wr-subject')[0].getElementsByTagName('a')[0].href;
|
||||
var contentsType = location.hostname.search("book") > -1 ? "book" : location.hostname.search("mana") > -1 ? "comics" : location.hostname.search("new") > -1 ? "webtoon" : "web";
|
||||
if (pageUrl != null && pageUrl.length > 0 && pageUrl.startsWith("http")) {
|
||||
pageUrl = new URL(pageUrl).pathname;
|
||||
var urlObj =URL.parse(pageUrl);
|
||||
pageUrl = urlObj.protocol + '//' + urlObj.host + urlObj.pathname;
|
||||
if (pageUrl) {
|
||||
var paths = pageUrl.split('/')
|
||||
if (paths.length > 0) {
|
||||
var last = paths[paths.length - 1];
|
||||
if (last && Array.from(last).every(ch => ch >= '0' && ch <= '9')) {
|
||||
|
||||
} else {
|
||||
paths.pop();
|
||||
}
|
||||
}
|
||||
|
||||
var newP = paths.join('/');
|
||||
|
||||
pageUrl = URL.parse(newP).pathname
|
||||
}
|
||||
} else {
|
||||
console.log("pageUrl.startsWith('http') == false" + pageUrl);
|
||||
}
|
||||
|
||||
var chapterTitle = children[i].getElementsByClassName('wr-subject')[0].getElementsByTagName('a')[0].innerText;
|
||||
if(chapterTitle.split('\n').length > 1) {
|
||||
chapterTitle = chapterTitle.split('\n')[1];
|
||||
@ -107,6 +171,7 @@ function getList(children) {
|
||||
'chapterID': Number(chapterNum),
|
||||
'chapterNum': Number(chapterNum),
|
||||
'pathUrl': pageUrl,
|
||||
'contentsType': contentsType,
|
||||
'bookPageUrl': bookPageUrl,
|
||||
'chapterTitle': chapterTitle,
|
||||
'bookTitle': bookTitle,
|
||||
@ -121,6 +186,7 @@ function getList(children) {
|
||||
{
|
||||
type: "getListResult",
|
||||
bookInfos: {
|
||||
'contentsType': contentsType,
|
||||
bookTitle: bookTitle,
|
||||
bookPageUrl: new URL(location.href).pathname,
|
||||
pages: contentsArray ,
|
||||
@ -150,7 +216,7 @@ function scrollByPercent(current , max) {
|
||||
const moveAmount = pageHeight / max;
|
||||
window.scrollTo({ top: moveAmount * current, behavior: "smooth" });
|
||||
}
|
||||
|
||||
document.querySelector(".header__inner")
|
||||
function scrollByPercentUpDown(isToDown , max) {
|
||||
const pageHeight = Math.max(
|
||||
document.body.scrollHeight,
|
||||
@ -161,7 +227,7 @@ function scrollByPercentUpDown(isToDown , max) {
|
||||
document.documentElement.clientHeight
|
||||
);
|
||||
const currentScroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
||||
const moveAmount = Math.max(pageHeight / max,100);
|
||||
const moveAmount = Math.max(pageHeight / max,150);
|
||||
window.scrollTo({ top: currentScroll + (moveAmount * isToDown) , behavior: "smooth" });
|
||||
}
|
||||
|
||||
@ -172,6 +238,11 @@ function sendMessage(msg) {
|
||||
port.postMessage(JSON.stringify(msg));
|
||||
}
|
||||
|
||||
function toast(msg) {
|
||||
port.postMessage(JSON.stringify({type:"MSG",msg:msg}));
|
||||
}
|
||||
|
||||
|
||||
function dssd() {
|
||||
|
||||
}
|
||||
@ -82,6 +82,8 @@ import bums.lunatic.launcher.home.RssViewBuilder
|
||||
import bums.lunatic.launcher.model.RssData
|
||||
import bums.lunatic.launcher.model.RssDataType
|
||||
import bums.lunatic.launcher.receiver.NLService
|
||||
import bums.lunatic.launcher.tokiz.Comics
|
||||
import bums.lunatic.launcher.tokiz.Webtoons
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import bums.lunatic.launcher.utils.FeedParseManager
|
||||
import bums.lunatic.launcher.utils.getJ
|
||||
@ -307,9 +309,10 @@ internal class LauncherActivity : CommonActivity() {
|
||||
var onExit = false
|
||||
var lastAction = MotionEvent.ACTION_HOVER_EXIT
|
||||
override fun dispatchKeyEvent(ev: KeyEvent): Boolean {
|
||||
Blog.LOGE("dispatch ev?.device?.name >>> ${ev?.device?.name}")
|
||||
if (ev?.device?.name?.contains("SM-031N Mouse") == true) {
|
||||
val currentFragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
|
||||
Blog.LOGE("dispatch ev?.device?.name >>> ${ev?.device?.name} , keyCode >> ${ev?.keyCode}")
|
||||
|
||||
if (ev?.device?.name?.contains("SM-031N Mouse") == true) {
|
||||
when(ev.action) {
|
||||
ACTION_UP -> {
|
||||
Blog.LOGE("dispatch dispatchKeyEvent>>> ${ev}")
|
||||
@ -384,26 +387,42 @@ internal class LauncherActivity : CommonActivity() {
|
||||
}
|
||||
else {
|
||||
if(MotionEvent.ACTION_UP.equals(ev?.action ?: MotionEvent.ACTION_CANCEL) == true) {
|
||||
when (ev.keyCode) {
|
||||
return when (ev.keyCode) {
|
||||
KeyEvent.KEYCODE_VOLUME_DOWN -> {
|
||||
|
||||
novels?.actionNextEvent()
|
||||
return true
|
||||
if(currentFragment is Novels){ currentFragment.actionNextEvent() }
|
||||
true
|
||||
}
|
||||
|
||||
KeyEvent.KEYCODE_VOLUME_UP -> {
|
||||
novels?.actionPrevEvent()
|
||||
return true
|
||||
if(currentFragment is Novels){ currentFragment.actionPrevEvent() }
|
||||
true
|
||||
}
|
||||
else -> return false
|
||||
else -> false
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
return when (ev.keyCode) {
|
||||
KeyEvent.KEYCODE_VOLUME_DOWN -> {
|
||||
true
|
||||
}
|
||||
KeyEvent.KEYCODE_VOLUME_UP -> {
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.dispatchKeyEvent(ev)
|
||||
}
|
||||
|
||||
override fun dispatchTrackballEvent(event: MotionEvent?): Boolean {
|
||||
Blog.LOGE("event >>> ${event?.device}")
|
||||
return super.dispatchTrackballEvent(event`)
|
||||
}
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
override fun dispatchKeyShortcutEvent(event: KeyEvent): Boolean {
|
||||
Blog.LOGE("event >>> ${event.device}")
|
||||
return super.dispatchKeyShortcutEvent(event)
|
||||
}
|
||||
|
||||
fun onClickCenterButton() {
|
||||
|
||||
@ -545,11 +564,7 @@ internal class LauncherActivity : CommonActivity() {
|
||||
"android.intent.extra.EXTRA_START_REASON"
|
||||
).equals("startDockOrHome")
|
||||
) {
|
||||
if (binding.home.visibility == View.VISIBLE) {
|
||||
switchAppDrawer()
|
||||
} else {
|
||||
|
||||
}
|
||||
} else {
|
||||
intent?.extras?.keySet()?.forEach {
|
||||
try {
|
||||
@ -576,8 +591,8 @@ internal class LauncherActivity : CommonActivity() {
|
||||
// }
|
||||
super.onNewIntent(intent)
|
||||
}
|
||||
var home : LauncherHome? = null
|
||||
var novels : Novels? = null
|
||||
|
||||
|
||||
@SuppressLint("NewApi", "MissingPermission")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
installSplashScreen()
|
||||
@ -599,74 +614,40 @@ internal class LauncherActivity : CommonActivity() {
|
||||
|
||||
|
||||
binding.tabs.setOnCheckedChangeListener { g, id ->
|
||||
when(id) {
|
||||
R.id.feeds -> {
|
||||
if(binding.feeds.isChecked) {
|
||||
if (home == null) {
|
||||
home = binding.home.getFragment<LauncherHome>()
|
||||
}
|
||||
binding.home.visibility = View.VISIBLE
|
||||
binding.booktoki.visibility = View.GONE
|
||||
} else {
|
||||
binding.home.visibility = View.GONE
|
||||
if (novels == null) {
|
||||
novels = binding.booktoki.getFragment<Novels>()
|
||||
|
||||
} else {
|
||||
novels?.onResume()
|
||||
}
|
||||
binding.booktoki.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
R.id.book ->{
|
||||
if(binding.book.isChecked) {
|
||||
binding.home.visibility = View.GONE
|
||||
if (novels == null) {
|
||||
novels = binding.booktoki.getFragment<Novels>()
|
||||
} else {
|
||||
novels?.onResume()
|
||||
}
|
||||
binding.booktoki.visibility = View.VISIBLE
|
||||
} else {
|
||||
if (home == null) {
|
||||
home = binding.home.getFragment<LauncherHome>()
|
||||
}
|
||||
binding.home.visibility = View.VISIBLE
|
||||
binding.booktoki.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
showContents(id)
|
||||
}
|
||||
|
||||
/* handle navigation back events */
|
||||
handleBackPress()
|
||||
|
||||
val cn = ComponentName(this, NLService::class.java)
|
||||
val n = applicationContext.getSystemService(NOTIFICATION_SERVICE) as NotificationManager
|
||||
if (n.isNotificationListenerAccessGranted(cn)) {
|
||||
} else {
|
||||
val intent = Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS)
|
||||
startActivity(intent)
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
if (!isExternalStorageManager()) {
|
||||
try {
|
||||
startActivityForResult(Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION).apply {
|
||||
addCategory("android.intent.category.DEFAULT")
|
||||
data = Uri.parse(String.format("package:%s", applicationContext.packageName))
|
||||
}, 300)
|
||||
} catch (e: Exception) {
|
||||
startActivityForResult(Intent().apply {
|
||||
action = Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
}
|
||||
updateLocationService()
|
||||
binding.book.isChecked = true
|
||||
binding.feeds.isChecked = true
|
||||
}
|
||||
|
||||
fun showContents(id : Int) {
|
||||
when(id) {
|
||||
R.id.feeds -> {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fragment_container, LauncherHome())
|
||||
.commit()
|
||||
}
|
||||
R.id.books ->{
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fragment_container, Novels())
|
||||
.commit()
|
||||
}
|
||||
R.id.webtoons ->{
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fragment_container, Webtoons())
|
||||
.commit()
|
||||
}
|
||||
R.id.comics ->{
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fragment_container, Comics())
|
||||
.commit()
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
private fun initGeckoRuntime() {
|
||||
if (sRuntime == null) {
|
||||
try {
|
||||
@ -697,14 +678,14 @@ internal class LauncherActivity : CommonActivity() {
|
||||
|
||||
super.onDestroy()
|
||||
}
|
||||
var blutoothManager : BluetoothManager? = null
|
||||
// var blutoothManager : BluetoothManager? = null
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
blutoothManager = BluetoothManager(this)
|
||||
blutoothManager?.register()
|
||||
blutoothManager?.initBluetoothAdapter()
|
||||
blutoothManager?.blueToothState()
|
||||
blutoothManager?.getPairedDevices()
|
||||
// blutoothManager = BluetoothManager(this)
|
||||
// blutoothManager?.register()
|
||||
// blutoothManager?.initBluetoothAdapter()
|
||||
// blutoothManager?.blueToothState()
|
||||
// blutoothManager?.getPairedDevices()
|
||||
statusBarView()
|
||||
setBgColor()
|
||||
}
|
||||
@ -713,7 +694,7 @@ internal class LauncherActivity : CommonActivity() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
refreshFeeds()
|
||||
blutoothManager?.getPairedDevices()
|
||||
// blutoothManager?.getPairedDevices()
|
||||
Blog.LOGE("LauncherActivity onResume")
|
||||
}
|
||||
|
||||
@ -760,11 +741,17 @@ internal class LauncherActivity : CommonActivity() {
|
||||
private fun handleBackPress() {
|
||||
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
|
||||
override fun handleOnBackPressed() {
|
||||
if (binding.booktoki.isVisible) {
|
||||
finish()
|
||||
} else {
|
||||
finish()
|
||||
val currentFragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
|
||||
when(currentFragment) {
|
||||
is LauncherHome ->{
|
||||
currentFragment.doNextPage()
|
||||
}
|
||||
}
|
||||
// if (binding.ho.isVisible) {
|
||||
// finish()
|
||||
// } else {
|
||||
// finish()
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package bums.lunatic.launcher.home
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
@ -16,6 +18,7 @@ import android.view.KeyEvent.KEYCODE_BUTTON_X
|
||||
import android.view.KeyEvent.KEYCODE_BUTTON_Y
|
||||
import android.view.KeyEvent.KEYCODE_DPAD_DOWN
|
||||
import android.view.KeyEvent.KEYCODE_DPAD_UP
|
||||
import android.widget.ProgressBar
|
||||
import bums.lunatic.launcher.LauncherActivity.Companion.getRuntime
|
||||
import bums.lunatic.launcher.tokiz.view.BWebview
|
||||
import bums.lunatic.launcher.tokiz.view.JxEvent
|
||||
@ -47,7 +50,7 @@ class GeckoWeb : BWebview {
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
|
||||
buildWeb()
|
||||
}
|
||||
|
||||
var progress : ProgressBar? = null
|
||||
val mPortNam = "browser"
|
||||
val extPath = "resource://android/assets/extensions/my_extension/"
|
||||
val extId = "messaging@booktoki468.com"
|
||||
@ -168,7 +171,7 @@ class GeckoWeb : BWebview {
|
||||
session: GeckoSession,
|
||||
mediaSession: MediaSession
|
||||
) {
|
||||
Blog.LOGE("onPlay")
|
||||
Blog.LOGE("onPlay $mediaSession")
|
||||
super.onPlay(session, mediaSession)
|
||||
}
|
||||
|
||||
@ -184,7 +187,7 @@ class GeckoWeb : BWebview {
|
||||
session: GeckoSession,
|
||||
mediaSession: MediaSession
|
||||
) {
|
||||
Blog.LOGE("onStop")
|
||||
Blog.LOGE("onStop $mediaSession")
|
||||
super.onStop(session, mediaSession)
|
||||
}
|
||||
|
||||
@ -275,8 +278,21 @@ class GeckoWeb : BWebview {
|
||||
super.onSessionStateChange(session, sessionState)
|
||||
}
|
||||
|
||||
override fun onProgressChange(session: GeckoSession, progress: Int) {
|
||||
super.onProgressChange(session, progress)
|
||||
this@GeckoWeb.progress?.setProgress(progress,true)
|
||||
}
|
||||
override fun onPageStart(session: GeckoSession, url: String) {
|
||||
super.onPageStart(session, url)
|
||||
if (url?.contains("reddit.app.link") == true) {
|
||||
session.stop()
|
||||
Uri.parse(url)?.let { uri ->
|
||||
context.startActivity(Intent().apply {
|
||||
action = Intent.ACTION_VIEW
|
||||
data = uri
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPageStop(session: GeckoSession, success: Boolean) {
|
||||
@ -325,6 +341,7 @@ class GeckoWeb : BWebview {
|
||||
// url이 현재 로드된 주소입니다.
|
||||
Blog.LOGE("GeckoView", "현재 주소: $url")
|
||||
Blog.LOGE("GeckoView", "현재 session: $session")
|
||||
|
||||
url?.let { url ->
|
||||
if (url.split("//").size > 1) {
|
||||
url.replace("//", "/").replace("https:/", "https://").let {
|
||||
|
||||
@ -25,6 +25,7 @@ import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.LayoutInflater
|
||||
import android.view.PointerIcon
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Toast
|
||||
@ -261,7 +262,7 @@ internal class LauncherHome : Fragment() {
|
||||
binding.infoList.visibility = View.VISIBLE
|
||||
binding.infoList.adapter = mRssAdapter
|
||||
binding.infoList.setOnTouchListener { v,e ->
|
||||
if (e.device.name?.contains("JX-12",true) == true) {
|
||||
if (e.device.name?.contains("JX-12",true) == true|| e.device.name?.equals("J06",true) == true) {
|
||||
Blog.LOGE("touchEvent -> ${e}")
|
||||
return@setOnTouchListener mSimpleFingerGestures.onTouch(v,e)
|
||||
} else {
|
||||
@ -270,6 +271,7 @@ internal class LauncherHome : Fragment() {
|
||||
}
|
||||
}
|
||||
queryInfos()
|
||||
binding.geckoWeb.progress = binding.progressBar
|
||||
binding.geckoWeb.jxInteface = { jxEvent ->
|
||||
when(jxEvent) {
|
||||
JxEvent.SCROLL_UP -> binding.geckoWeb.sendScrollDown(false)
|
||||
@ -285,6 +287,9 @@ internal class LauncherHome : Fragment() {
|
||||
}
|
||||
}
|
||||
}
|
||||
val nullCursor = PointerIcon.getSystemIcon(context!!, PointerIcon.TYPE_NULL)
|
||||
binding.root.setPointerIcon(nullCursor)
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
@ -336,7 +341,7 @@ internal class LauncherHome : Fragment() {
|
||||
delete(
|
||||
query<RssData>()
|
||||
.query("pubDate < $0", beforeDay(30))
|
||||
.query("category != $0 AND category != $1 ", RssDataType.GURU.name, RssDataType.MOST.name)
|
||||
// .query("category != $0 AND category != $1 ", RssDataType.GURU.name, RssDataType.MOST.name)
|
||||
.query("vote != $0", true).find()
|
||||
)
|
||||
}
|
||||
@ -369,7 +374,7 @@ internal class LauncherHome : Fragment() {
|
||||
beforeQuery()
|
||||
var rQ = WorkersDb.getRealm().query<RssData>().query("read < $0", nomoreShowCount).distinct("originPage", "title")
|
||||
if (!noLimit) rQ.query("pubDate > $0", beforeOneDay())
|
||||
((filter?.size ?: 0) > 0).letTrue {filter!!.forEach {rQ = rQ.query("category != $0", it.name)}}
|
||||
// ((filter?.size ?: 0) > 0).letTrue {filter!!.forEach {rQ = rQ.query("category != $0", it.name)}}
|
||||
updateQuery(rQ)
|
||||
}
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
private val swipeTime = 300 // 스와이프 최대 시간(ms)
|
||||
private val clickThreshold = 30 // 클릭으로 인정할 최대 이동 거리(px)
|
||||
override fun onTouch(v: View?, event: MotionEvent): Boolean {
|
||||
if(event.device.name.equals("JX-12",true)) {
|
||||
if (event.device.name?.contains("JX-12",true) == true|| event.device.name?.equals("J06",true) == true) {
|
||||
when (event.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
startX = event.x
|
||||
|
||||
@ -220,7 +220,7 @@ internal class RssItemAdapter (
|
||||
event: MotionEvent
|
||||
): Boolean {
|
||||
Blog.LOGE("event.device.name >>> ${event.device.name}")
|
||||
if (event.device.name?.contains("JX-12",true) == true) {
|
||||
if (event.device.name?.contains("JX-12",true) == true|| event.device.name?.equals("J06",true) == true) {
|
||||
return true//mSimpleFingerGestures.onTouch(v,event)
|
||||
} else {
|
||||
return false
|
||||
|
||||
1490
app/src/main/kotlin/bums/lunatic/launcher/tokiz/BaseToki.kt
Normal file
1490
app/src/main/kotlin/bums/lunatic/launcher/tokiz/BaseToki.kt
Normal file
File diff suppressed because it is too large
Load Diff
182
app/src/main/kotlin/bums/lunatic/launcher/tokiz/Comics.kt
Normal file
182
app/src/main/kotlin/bums/lunatic/launcher/tokiz/Comics.kt
Normal file
@ -0,0 +1,182 @@
|
||||
package bums.lunatic.launcher.tokiz
|
||||
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.text.InputType
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.style.RelativeSizeSpan
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.OnTouchListener
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.View.inflate
|
||||
import android.view.ViewGroup
|
||||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.net.toUri
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.Fragment
|
||||
import bums.lunatic.launcher.LauncherActivity.Companion.getRuntime
|
||||
import bums.lunatic.launcher.R
|
||||
import bums.lunatic.launcher.tokiz.common.PairArray
|
||||
import bums.lunatic.launcher.tokiz.common.TouchArea
|
||||
import bums.lunatic.launcher.tokiz.common.colorz
|
||||
import bums.lunatic.launcher.tokiz.common.getIndex
|
||||
import bums.lunatic.launcher.tokiz.common.typesfacez
|
||||
import bums.lunatic.launcher.tokiz.data.HistoryManager
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsPageInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsCollection
|
||||
import bums.lunatic.launcher.tokiz.data.model.PageInfosJ
|
||||
import bums.lunatic.launcher.tokiz.data.model.HistoryItem
|
||||
import bums.lunatic.launcher.tokiz.data.model.LastInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.PortMessage
|
||||
import bums.lunatic.launcher.tokiz.data.model.ReaderConfig
|
||||
import bums.lunatic.launcher.tokiz.dialog.DefaultList
|
||||
import bums.lunatic.launcher.tokiz.view.JxEvent
|
||||
import bums.lunatic.launcher.tokiz.view.PagedTextLayout
|
||||
import bums.lunatic.launcher.tokiz.view.PagedTextViewInterface
|
||||
import bums.lunatic.launcher.databinding.BooktokiBinding
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import com.google.gson.Gson
|
||||
import io.realm.kotlin.Realm
|
||||
import io.realm.kotlin.UpdatePolicy
|
||||
import io.realm.kotlin.ext.copyFromRealm
|
||||
import io.realm.kotlin.ext.query
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import org.mozilla.gecko.util.ThreadUtils
|
||||
import org.mozilla.geckoview.GeckoResult
|
||||
import org.mozilla.geckoview.GeckoSession
|
||||
import org.mozilla.geckoview.MediaSession
|
||||
import org.mozilla.geckoview.WebExtension
|
||||
import org.mozilla.geckoview.WebExtension.MessageDelegate
|
||||
import org.mozilla.geckoview.WebExtension.PortDelegate
|
||||
import org.mozilla.geckoview.WebExtensionController.AddonManagerDelegate
|
||||
import org.mozilla.geckoview.WebRequestError
|
||||
import java.lang.System.currentTimeMillis
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.collections.List
|
||||
import kotlin.collections.MutableList
|
||||
import kotlin.collections.arrayListOf
|
||||
import kotlin.collections.first
|
||||
import kotlin.collections.isNotEmpty
|
||||
import kotlin.collections.last
|
||||
import kotlin.collections.sortBy
|
||||
import kotlin.random.Random
|
||||
import kotlin.text.contains
|
||||
import kotlin.text.endsWith
|
||||
import kotlin.text.equals
|
||||
import kotlin.text.replace
|
||||
import kotlin.text.split
|
||||
import kotlin.text.startsWith
|
||||
import kotlin.text.toInt
|
||||
import kotlin.text.toRegex
|
||||
import kotlin.text.trim
|
||||
|
||||
|
||||
class Comics : BaseToki(), PagedTextViewInterface {
|
||||
|
||||
override val contentsType = "comics"
|
||||
override var lastNumber : Int = 468
|
||||
override val webcontentsName : String = "manatoki"
|
||||
override val afterDot = "net"
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
super.onCreateView(inflater, container, savedInstanceState)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
loadLastInfo()
|
||||
}
|
||||
|
||||
override fun onTouch(touchArea: TouchArea) {
|
||||
Blog.LOGD(log = "onTouch ${touchArea}")
|
||||
when (touchArea) {
|
||||
TouchArea.Center -> {
|
||||
|
||||
}
|
||||
|
||||
TouchArea.Right -> {
|
||||
actionNextEvent()
|
||||
}
|
||||
|
||||
TouchArea.Left -> {
|
||||
actionPrevEvent()
|
||||
}
|
||||
|
||||
TouchArea.DoubleRight -> {
|
||||
actionNextEvent(true)
|
||||
}
|
||||
|
||||
TouchArea.DoubleLeft -> {
|
||||
actionPrevEvent(true)
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onLongClick() {
|
||||
Blog.LOGD(log = "onLongClick")
|
||||
|
||||
}
|
||||
|
||||
override fun onSwipeLeft(count: Int) {
|
||||
Blog.LOGD(log = "onSwipeLeft ${count}")
|
||||
actionNextEvent(count > 1)
|
||||
|
||||
}
|
||||
|
||||
override fun onSwipeRight(count: Int) {
|
||||
Blog.LOGD(log = "onSwipeRight ${count}")
|
||||
actionPrevEvent(count > 1)
|
||||
}
|
||||
|
||||
override fun onSwipeUp(touchCount: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onSwipeDown(touchCount: Int) {
|
||||
if (touchCount == 2) {
|
||||
if (binding.pagedLayer.isVisible) {
|
||||
binding.pagedLayer.visibility = GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTimeoverTouch() {
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
183
app/src/main/kotlin/bums/lunatic/launcher/tokiz/Webtoons.kt
Normal file
183
app/src/main/kotlin/bums/lunatic/launcher/tokiz/Webtoons.kt
Normal file
@ -0,0 +1,183 @@
|
||||
package bums.lunatic.launcher.tokiz
|
||||
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Color
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import android.text.InputType
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.style.RelativeSizeSpan
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.OnTouchListener
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.View.inflate
|
||||
import android.view.ViewGroup
|
||||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.net.toUri
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.fragment.app.Fragment
|
||||
import bums.lunatic.launcher.LauncherActivity.Companion.getRuntime
|
||||
import bums.lunatic.launcher.R
|
||||
import bums.lunatic.launcher.tokiz.common.PairArray
|
||||
import bums.lunatic.launcher.tokiz.common.TouchArea
|
||||
import bums.lunatic.launcher.tokiz.common.colorz
|
||||
import bums.lunatic.launcher.tokiz.common.getIndex
|
||||
import bums.lunatic.launcher.tokiz.common.typesfacez
|
||||
import bums.lunatic.launcher.tokiz.data.HistoryManager
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsPageInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsCollection
|
||||
import bums.lunatic.launcher.tokiz.data.model.PageInfosJ
|
||||
import bums.lunatic.launcher.tokiz.data.model.HistoryItem
|
||||
import bums.lunatic.launcher.tokiz.data.model.LastInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.PortMessage
|
||||
import bums.lunatic.launcher.tokiz.data.model.ReaderConfig
|
||||
import bums.lunatic.launcher.tokiz.dialog.DefaultList
|
||||
import bums.lunatic.launcher.tokiz.view.JxEvent
|
||||
import bums.lunatic.launcher.tokiz.view.PagedTextLayout
|
||||
import bums.lunatic.launcher.tokiz.view.PagedTextViewInterface
|
||||
import bums.lunatic.launcher.databinding.BooktokiBinding
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import com.google.gson.Gson
|
||||
import io.realm.kotlin.Realm
|
||||
import io.realm.kotlin.UpdatePolicy
|
||||
import io.realm.kotlin.ext.copyFromRealm
|
||||
import io.realm.kotlin.ext.query
|
||||
import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import org.mozilla.gecko.util.ThreadUtils
|
||||
import org.mozilla.geckoview.GeckoResult
|
||||
import org.mozilla.geckoview.GeckoSession
|
||||
import org.mozilla.geckoview.MediaSession
|
||||
import org.mozilla.geckoview.WebExtension
|
||||
import org.mozilla.geckoview.WebExtension.MessageDelegate
|
||||
import org.mozilla.geckoview.WebExtension.PortDelegate
|
||||
import org.mozilla.geckoview.WebExtensionController.AddonManagerDelegate
|
||||
import org.mozilla.geckoview.WebRequestError
|
||||
import java.lang.System.currentTimeMillis
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.collections.List
|
||||
import kotlin.collections.MutableList
|
||||
import kotlin.collections.arrayListOf
|
||||
import kotlin.collections.first
|
||||
import kotlin.collections.isNotEmpty
|
||||
import kotlin.collections.last
|
||||
import kotlin.collections.sortBy
|
||||
import kotlin.random.Random
|
||||
import kotlin.text.contains
|
||||
import kotlin.text.endsWith
|
||||
import kotlin.text.equals
|
||||
import kotlin.text.replace
|
||||
import kotlin.text.split
|
||||
import kotlin.text.startsWith
|
||||
import kotlin.text.toInt
|
||||
import kotlin.text.toRegex
|
||||
import kotlin.text.trim
|
||||
|
||||
|
||||
class Webtoons : BaseToki(), PagedTextViewInterface {
|
||||
|
||||
override val contentsType = "webtoon"
|
||||
override var lastNumber : Int = 468
|
||||
override val webcontentsName : String = "newtoki"
|
||||
override val afterDot = "com"
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
super.onCreateView(inflater, container, savedInstanceState)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
loadLastInfo()
|
||||
Blog.LOGE("binding.root >>> ${binding.root}")
|
||||
}
|
||||
|
||||
override fun onTouch(touchArea: TouchArea) {
|
||||
Blog.LOGD(log = "onTouch ${touchArea}")
|
||||
when (touchArea) {
|
||||
TouchArea.Center -> {
|
||||
|
||||
}
|
||||
|
||||
TouchArea.Right -> {
|
||||
actionNextEvent()
|
||||
}
|
||||
|
||||
TouchArea.Left -> {
|
||||
actionPrevEvent()
|
||||
}
|
||||
|
||||
TouchArea.DoubleRight -> {
|
||||
actionNextEvent(true)
|
||||
}
|
||||
|
||||
TouchArea.DoubleLeft -> {
|
||||
actionPrevEvent(true)
|
||||
}
|
||||
else -> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun onLongClick() {
|
||||
Blog.LOGD(log = "onLongClick")
|
||||
|
||||
}
|
||||
|
||||
override fun onSwipeLeft(count: Int) {
|
||||
Blog.LOGD(log = "onSwipeLeft ${count}")
|
||||
actionNextEvent(count > 1)
|
||||
|
||||
}
|
||||
|
||||
override fun onSwipeRight(count: Int) {
|
||||
Blog.LOGD(log = "onSwipeRight ${count}")
|
||||
actionPrevEvent(count > 1)
|
||||
}
|
||||
|
||||
override fun onSwipeUp(touchCount: Int) {
|
||||
|
||||
}
|
||||
|
||||
override fun onSwipeDown(touchCount: Int) {
|
||||
if (touchCount == 2) {
|
||||
if (binding.pagedLayer.isVisible) {
|
||||
binding.pagedLayer.visibility = GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTimeoverTouch() {
|
||||
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,6 @@ package bums.lunatic.launcher.tokiz.common
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import bums.lunatic.launcher.tokiz.webcontents.contentsinfo.BooktokiStruct
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
|
||||
object PrefManager {
|
||||
@ -20,9 +19,9 @@ object PrefManager {
|
||||
return main.getString(key, "")
|
||||
}
|
||||
|
||||
fun getLastDomain() : String {
|
||||
return main.getString(domainKey, BooktokiStruct.getLastedDoamin()) ?: BooktokiStruct.getLastedDoamin()
|
||||
}
|
||||
// fun getLastDomain() : String {
|
||||
// return main.getString(domainKey, BooktokiStruct.getLastedDoamin()) ?: BooktokiStruct.getLastedDoamin()
|
||||
// }
|
||||
fun putLastDomain(domain : String) {
|
||||
Blog.LOGE("domain >>> ${domain}")
|
||||
main.edit().putString(domainKey,domain).apply()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package bums.lunatic.launcher.tokiz.data
|
||||
|
||||
import bums.lunatic.launcher.tokiz.data.model.BookPageInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.BookPageInfos
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsPageInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsCollection
|
||||
import bums.lunatic.launcher.tokiz.data.model.HistoryItem
|
||||
import bums.lunatic.launcher.tokiz.data.model.LastInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.ReaderConfig
|
||||
@ -45,9 +45,9 @@ object HistoryManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun getBookInfos(aUrl : String, callback : (BookPageInfos?)->Unit) {
|
||||
fun getBookInfos(contentsType : String,aUrl : String, callback : (ContentsCollection?)->Unit) {
|
||||
var url : String = aUrl
|
||||
Blog.LOGE("aUrl >>> ${aUrl}")
|
||||
Blog.LOGE("aUrl >>> ${aUrl} , contentsType ${contentsType}")
|
||||
openRealm.apply{
|
||||
if (url.startsWith("//")) {
|
||||
while (url.startsWith("//")) {
|
||||
@ -55,15 +55,17 @@ object HistoryManager {
|
||||
}
|
||||
}
|
||||
Blog.LOGE("aUrl >>> ${url}")
|
||||
var bookPageInfo = this.query(BookPageInfo::class).query("pathUrl == $0 || bookPageUrl == $0","${url}").find()
|
||||
if (bookPageInfo != null && bookPageInfo.count() > 0) {
|
||||
Blog.LOGE("get ${bookPageInfo}" )
|
||||
var pgs = this.query(BookPageInfos::class,"bookPageUrl == $0", bookPageInfo.first().bookPageUrl).find()
|
||||
var contentsPageInfo = this.query(ContentsPageInfo::class).query("contentsType == $0", contentsType).query("pathUrl == $0 || bookPageUrl == $0","${url}").find()
|
||||
if (contentsPageInfo != null && contentsPageInfo.count() > 0) {
|
||||
Blog.LOGE("get ${contentsPageInfo}" )
|
||||
var pgs = this.query(ContentsCollection::class,"bookPageUrl == $0", contentsPageInfo.first().bookPageUrl).find()
|
||||
if (pgs.size > 0) {
|
||||
pgs.first().let {
|
||||
Blog.LOGE("get ${it} , ${it?.pages}")
|
||||
callback.invoke(this.copyFromRealm(it))
|
||||
}
|
||||
} else {
|
||||
callback.invoke(null)
|
||||
}
|
||||
} else {
|
||||
callback.invoke(null)
|
||||
@ -71,7 +73,7 @@ object HistoryManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun getBookPageInfo(aUrl : String, callback : (BookPageInfo?)->Unit) {
|
||||
fun getBookPageInfo(contentsType : String, aUrl : String, callback : (ContentsPageInfo?)->Unit) {
|
||||
var url : String = aUrl
|
||||
openRealm.apply{
|
||||
if (url.startsWith("//")) {
|
||||
@ -79,7 +81,7 @@ object HistoryManager {
|
||||
url = url.replace("//","/").trim()
|
||||
}
|
||||
}
|
||||
var result = this.query(BookPageInfo::class).query("pathUrl == $0","${url}").find()
|
||||
var result = this.query(ContentsPageInfo::class).query("contentsType == $0", contentsType).query("pathUrl == $0","${url}").find()
|
||||
if (result.size > 0) {
|
||||
var bookPageInfo = result?.first()
|
||||
if (bookPageInfo != null) {
|
||||
@ -93,7 +95,7 @@ object HistoryManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun setBookPageInfo(aUrl : String, page :Int) {
|
||||
fun setBookPageInfo(contentsType : String,aUrl : String, page :Int) {
|
||||
var url : String = aUrl
|
||||
openRealm.writeBlocking {
|
||||
if (url.startsWith("//")) {
|
||||
@ -101,7 +103,7 @@ object HistoryManager {
|
||||
url = url.replace("//","/").trim()
|
||||
}
|
||||
}
|
||||
var result = this.query(BookPageInfo::class).query("pathUrl == $0","${url}").find()
|
||||
var result = this.query(ContentsPageInfo::class).query("contentsType == $0", contentsType).query("pathUrl == $0","${url}").find()
|
||||
if (result.size > 0) {
|
||||
var bookPageInfo = result?.first()
|
||||
if (bookPageInfo != null) {
|
||||
@ -111,13 +113,13 @@ object HistoryManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun getBooPageInfoContentsSave(aUrl : String, contents : String) {
|
||||
fun getBooPageInfoContentsSave(contentsType : String,aUrl : String, contents : String) {
|
||||
var url : String = if (aUrl.startsWith("//") || aUrl.startsWith("///") || aUrl.startsWith("////")) {
|
||||
aUrl.replace("////","/").replace("///","/").replace("//","/")
|
||||
} else aUrl
|
||||
openRealm.writeBlocking {
|
||||
Blog.LOGE("getBooPageInfoContentsSave ${url}")
|
||||
val result = query(BookPageInfo::class).query("pathUrl == $0", "${url}").find()
|
||||
val result = query(ContentsPageInfo::class).query("contentsType == $0", contentsType).query("pathUrl == $0", "${url}").find()
|
||||
if (result.size > 0) {
|
||||
result.first().contents = contents
|
||||
copyToRealm(result.first(), UpdatePolicy.ALL)
|
||||
@ -128,7 +130,7 @@ object HistoryManager {
|
||||
|
||||
|
||||
|
||||
fun getNextPage(aUrl : String ,callback : (BookPageInfo?)->Unit) {
|
||||
fun getNextPage(contentsType : String,aUrl : String ,callback : (ContentsPageInfo?)->Unit) {
|
||||
var url : String = aUrl
|
||||
openRealm.apply{
|
||||
if (url.startsWith("//")) {
|
||||
@ -136,11 +138,11 @@ object HistoryManager {
|
||||
url = url.replace("//","/").trim()
|
||||
}
|
||||
}
|
||||
var bookPageInfo =
|
||||
this.query(BookPageInfo::class).query("pathUrl == $0", url).find()
|
||||
if (bookPageInfo.size > 0) {
|
||||
Blog.LOGE("getNextPage 2 => chapterNum : ${bookPageInfo.first().chapterNum} , bookPageInfo.bookPageUrl : ${bookPageInfo.first().bookPageUrl}" )
|
||||
var results = this.query(BookPageInfo::class).query("chapterNum == $0",bookPageInfo.first().chapterNum + 1).query("bookPageUrl == $0","${bookPageInfo.first().bookPageUrl}").find()
|
||||
var contentsPageInfo =
|
||||
this.query(ContentsPageInfo::class).query("contentsType == $0", contentsType).query("pathUrl == $0", url).find()
|
||||
if (contentsPageInfo.size > 0) {
|
||||
Blog.LOGE("getNextPage 2 => chapterNum : ${contentsPageInfo.first().chapterNum} , bookPageInfo.bookPageUrl : ${contentsPageInfo.first().bookPageUrl}" )
|
||||
var results = this.query(ContentsPageInfo::class).query("chapterNum == $0",contentsPageInfo.first().chapterNum + 1).query("bookPageUrl == $0","${contentsPageInfo.first().bookPageUrl}").find()
|
||||
if(results.size > 0) {
|
||||
results.first().let {
|
||||
Blog.LOGE("getNextPage 2 nextBook pathUrl : ${it.pathUrl}" )
|
||||
@ -152,7 +154,7 @@ object HistoryManager {
|
||||
}
|
||||
|
||||
|
||||
fun getPrevPage(aUrl : String ,callback : (BookPageInfo?)->Unit) {
|
||||
fun getPrevPage(contentsType : String,aUrl : String ,callback : (ContentsPageInfo?)->Unit) {
|
||||
var url : String = aUrl
|
||||
openRealm.apply{
|
||||
Blog.LOGE("getPrevPage ${url}" )
|
||||
@ -162,13 +164,13 @@ object HistoryManager {
|
||||
}
|
||||
}
|
||||
Blog.LOGE("getPrevPage ${url}" )
|
||||
var bookPageInfo =
|
||||
this.query(BookPageInfo::class).query("pathUrl == $0", url).find()
|
||||
Blog.LOGE("getPrevPage ${bookPageInfo}" )
|
||||
if (bookPageInfo.size > 0) {
|
||||
Blog.LOGE("getPrevPage 2 ${bookPageInfo?.first()?.chapterNum}" )
|
||||
Blog.LOGE("getPrevPage 2 ${bookPageInfo?.first()?.bookPageUrl}" )
|
||||
var results = this.query(BookPageInfo::class).query("chapterNum == $0",bookPageInfo.first().chapterNum - 1).query("bookPageUrl == $0","${bookPageInfo.first().bookPageUrl}").find()
|
||||
var contentsPageInfo =
|
||||
this.query(ContentsPageInfo::class).query("contentsType == $0", contentsType).query("pathUrl == $0", url).find()
|
||||
Blog.LOGE("getPrevPage ${contentsPageInfo}" )
|
||||
if (contentsPageInfo.size > 0) {
|
||||
Blog.LOGE("getPrevPage 2 ${contentsPageInfo?.first()?.chapterNum}" )
|
||||
Blog.LOGE("getPrevPage 2 ${contentsPageInfo?.first()?.bookPageUrl}" )
|
||||
var results = this.query(ContentsPageInfo::class).query("chapterNum == $0",contentsPageInfo.first().chapterNum - 1).query("bookPageUrl == $0","${contentsPageInfo.first().bookPageUrl}").find()
|
||||
if(results.size > 0) {
|
||||
results.first()?.let {
|
||||
Blog.LOGE("getPrevPage 2 ${it.bookPageUrl}" )
|
||||
|
||||
@ -7,7 +7,7 @@ import io.realm.kotlin.types.annotations.PrimaryKey
|
||||
|
||||
class PortMessage {
|
||||
var type : String? = ""
|
||||
var bookInfos : BookPageInfosJ? = null
|
||||
var bookInfos : PageInfosJ? = null
|
||||
var book : BookContents? = null
|
||||
var msg : String? = null
|
||||
}
|
||||
@ -16,11 +16,11 @@ class BookContents {
|
||||
var bookContents : String? = null
|
||||
}
|
||||
|
||||
class BookPageInfosJ {
|
||||
class PageInfosJ {
|
||||
var bookTitle : String = ""
|
||||
var bookPageUrl : String = ""
|
||||
|
||||
var pages : ArrayList<BookPageInfoJ> = arrayListOf<BookPageInfoJ>()
|
||||
var contentsType : String? = ""
|
||||
var pages : ArrayList<PageInfoJ> = arrayListOf<PageInfoJ>()
|
||||
|
||||
fun getTitleArray() : ArrayList<String> {
|
||||
var arrayList = ArrayList<String>()
|
||||
@ -28,15 +28,16 @@ class BookPageInfosJ {
|
||||
return arrayList
|
||||
}
|
||||
|
||||
fun getR() : BookPageInfos{
|
||||
var r = BookPageInfos()
|
||||
fun getR() : ContentsCollection{
|
||||
var r = ContentsCollection()
|
||||
r.bookTitle = this.bookTitle
|
||||
r.bookPageUrl = this.bookPageUrl
|
||||
|
||||
r.contentsType = this.contentsType
|
||||
return r
|
||||
}
|
||||
}
|
||||
class BookPageInfoJ {
|
||||
|
||||
class PageInfoJ {
|
||||
var chapterID : Int = 0
|
||||
var contents : String? = ""
|
||||
var bookPageUrl : String? = ""
|
||||
@ -45,9 +46,10 @@ class BookPageInfoJ {
|
||||
var chapterNum : Int = 0
|
||||
var lastPage : Int? = 0
|
||||
var pathUrl : String? = ""
|
||||
var contentsType : String? = ""
|
||||
|
||||
fun getRealm() : BookPageInfo {
|
||||
var r = BookPageInfo()
|
||||
fun getRealm() : ContentsPageInfo {
|
||||
var r = ContentsPageInfo()
|
||||
r.chapterID = this.chapterID
|
||||
r.contents = this.contents
|
||||
r.bookPageUrl = this.bookPageUrl ?: ""
|
||||
@ -56,19 +58,20 @@ class BookPageInfoJ {
|
||||
r.chapterNum = this.chapterNum
|
||||
r.lastPage = this.lastPage
|
||||
r.pathUrl = this.pathUrl?.replace("'","")
|
||||
|
||||
r.contentsType = this.contentsType
|
||||
return r
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class BookPageInfos : RealmObject {
|
||||
class ContentsCollection : RealmObject {
|
||||
|
||||
var bookTitle : String = ""
|
||||
|
||||
@PrimaryKey
|
||||
var bookPageUrl : String? = ""
|
||||
var pages : RealmList<BookPageInfo> = realmListOf()
|
||||
var pages : RealmList<ContentsPageInfo> = realmListOf()
|
||||
var contentsType : String? = ""
|
||||
|
||||
fun getTitleArray() : ArrayList<String> {
|
||||
var arrayList = ArrayList<String>()
|
||||
@ -78,11 +81,11 @@ class BookPageInfos : RealmObject {
|
||||
}
|
||||
|
||||
fun sort() {
|
||||
val comparator : Comparator<BookPageInfo> = compareBy { it.chapterID }
|
||||
val comparator : Comparator<ContentsPageInfo> = compareBy { it.chapterID }
|
||||
pages.sortWith(comparator)
|
||||
}
|
||||
|
||||
fun hasItem(item: BookPageInfo) : Boolean {
|
||||
fun hasItem(item: ContentsPageInfo) : Boolean {
|
||||
var hasItem = false
|
||||
for (c in pages) {
|
||||
if (!hasItem) {
|
||||
@ -94,7 +97,7 @@ class BookPageInfos : RealmObject {
|
||||
|
||||
|
||||
}
|
||||
class BookPageInfo : RealmObject {
|
||||
class ContentsPageInfo : RealmObject {
|
||||
|
||||
var chapterID : Int = 0
|
||||
var contents : String? = ""
|
||||
@ -104,6 +107,7 @@ class BookPageInfo : RealmObject {
|
||||
var bookTitle : String? = ""
|
||||
var chapterNum : Int = 0
|
||||
var lastPage : Int? = 0
|
||||
var contentsType : String? = ""
|
||||
|
||||
fun isValidBook() = (pathUrl?.length ?: 0) > 1
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package bums.lunatic.launcher.tokiz.data.model
|
||||
class FakeSessions : ArrayList<FakeSession>{
|
||||
constructor(initialCapacity: Int) : super(initialCapacity)
|
||||
constructor() : super()
|
||||
constructor(c: MutableCollection<out FakeSession>) : super(c)
|
||||
}
|
||||
data class FakeSession (val scrolldata: ScrollData, val history: History )
|
||||
data class ScrollData(
|
||||
val scroll: String,
|
||||
val zoom: Zoom
|
||||
)
|
||||
|
||||
data class Zoom(
|
||||
val resolution: Int,
|
||||
val displaySize: DisplaySize
|
||||
)
|
||||
|
||||
data class DisplaySize(
|
||||
val height: Int,
|
||||
val width: Int
|
||||
)
|
||||
|
||||
data class History(
|
||||
val entries: List<HistoryEntry>,
|
||||
val requestedIndex: Int,
|
||||
val fromIdx: Int,
|
||||
val index: Int
|
||||
)
|
||||
|
||||
data class HistoryEntry(
|
||||
val persist: Boolean,
|
||||
val cacheKey: Int,
|
||||
val ID: Int,
|
||||
val url: String,
|
||||
val title: String,
|
||||
val loadReplace: Boolean,
|
||||
val docIdentifier: Long,
|
||||
val loadReplace2: Boolean,
|
||||
val partitionedPrincipalToInherit_base64: Map<String, Map<String, String>>,
|
||||
val triggeringPrincipal_base64: Map<String, Map<String, String>>,
|
||||
val principalToInherit_base64: Map<String, Map<String, String>>,
|
||||
val resultPrincipalURI: String,
|
||||
val hasUserInteraction: Boolean,
|
||||
val originalURI: String,
|
||||
val docshellUUID: String
|
||||
)
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package bums.lunatic.launcher.tokiz.data.model
|
||||
|
||||
import android.content.pm.ActivityInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.LastInfo
|
||||
import io.realm.kotlin.types.RealmObject
|
||||
import io.realm.kotlin.types.annotations.PrimaryKey
|
||||
import java.text.SimpleDateFormat
|
||||
@ -9,12 +10,17 @@ import java.util.Date
|
||||
|
||||
class LastInfo : RealmObject {
|
||||
@PrimaryKey
|
||||
var _id : String = "UniqLastId"
|
||||
var _id : String = ""
|
||||
var pageUrl : String = ""
|
||||
var title : String = ""
|
||||
var chapter : Int = 0
|
||||
var pageIndex : Int = 0
|
||||
var contentsName : String = ""
|
||||
var contentsType : String? = ""
|
||||
set(value) {
|
||||
_id = value ?: ""
|
||||
field = value
|
||||
}
|
||||
var displayOrientation : Int = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
|
||||
fun makeHistoryItem() : HistoryItem = HistoryItem().apply {
|
||||
@ -24,6 +30,7 @@ class LastInfo : RealmObject {
|
||||
pageIndex = this@LastInfo.pageIndex
|
||||
contentsName = this@LastInfo.contentsName
|
||||
displayOrientation = this@LastInfo.displayOrientation
|
||||
contentsType = this@LastInfo.contentsType
|
||||
}
|
||||
}
|
||||
class HistoryItem : RealmObject {
|
||||
@ -34,6 +41,7 @@ class HistoryItem : RealmObject {
|
||||
var pageIndex : Int = 0
|
||||
var contentsName : String = ""
|
||||
var displayOrientation : Int = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
var contentsType : String? = ""
|
||||
|
||||
fun makeLastInfo() = LastInfo().apply{
|
||||
_id = "UniqLastId"
|
||||
@ -43,13 +51,15 @@ class HistoryItem : RealmObject {
|
||||
pageIndex = this@HistoryItem.pageIndex
|
||||
contentsName = this@HistoryItem.contentsName
|
||||
displayOrientation = this@HistoryItem.displayOrientation
|
||||
contentsType = this@HistoryItem.contentsType
|
||||
}
|
||||
fun putHistory(bookPageInfo: BookPageInfo? , currentPath : String) : HistoryItem {
|
||||
title = bookPageInfo?.bookTitle ?: SimpleDateFormat("YY-mm-DD-HH:mm").format(Date())
|
||||
pageUrl = bookPageInfo?.pathUrl ?: currentPath
|
||||
chapter = bookPageInfo?.chapterNum ?: 0
|
||||
pageIndex = bookPageInfo?.lastPage ?: 0
|
||||
contentsName = bookPageInfo?.chapterTitle ?: ""
|
||||
fun putHistory(contentsPageInfo: ContentsPageInfo?, currentPath : String) : HistoryItem {
|
||||
title = contentsPageInfo?.bookTitle ?: SimpleDateFormat("YY-mm-DD-HH:mm").format(Date())
|
||||
pageUrl = contentsPageInfo?.pathUrl ?: currentPath
|
||||
chapter = contentsPageInfo?.chapterNum ?: 0
|
||||
pageIndex = contentsPageInfo?.lastPage ?: 0
|
||||
contentsName = contentsPageInfo?.chapterTitle ?: ""
|
||||
contentsType = contentsPageInfo?.contentsType ?: ""
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,10 +5,10 @@ import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import android.widget.ArrayAdapter
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import bums.lunatic.launcher.tokiz.data.model.BookPageInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsPageInfo
|
||||
|
||||
object DefaultList {
|
||||
fun showDefaultList(context: Context, title : String, items : Collection<BookPageInfo>, firstPosition : Int, choosedTitle : (Int)->String, chooedPositive : (Int)->Unit, saveCalback : (Int)->Unit ) {
|
||||
fun showDefaultList(context: Context, title : String, items : Collection<ContentsPageInfo>, firstPosition : Int, choosedTitle : (Int)->String, chooedPositive : (Int)->Unit, saveCalback : (Int)->Unit ) {
|
||||
val builderSingle: AlertDialog.Builder = AlertDialog.Builder(context)
|
||||
builderSingle.setTitle(title)
|
||||
val arrayAdapter =
|
||||
|
||||
@ -2,12 +2,13 @@ package bums.lunatic.launcher.tokiz.view
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.PointerIcon
|
||||
import android.view.View
|
||||
import androidx.core.view.isVisible
|
||||
import bums.lunatic.launcher.tokiz.common.TouchArea
|
||||
import bums.lunatic.launcher.tokiz.webcontents.contentsinfo.BooktokiStruct
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import bums.lunatic.launcher.utils.SimpleFingerGestures
|
||||
import org.mozilla.geckoview.GeckoView
|
||||
@ -23,23 +24,37 @@ typealias JxInteface = (JxEvent)->Unit
|
||||
open class BWebview : GeckoView {
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
constructor(context: Context?) : super(context) {
|
||||
this.setOnTouchListener { v,e ->
|
||||
if (e.device.name.contains("JX-12",true) == true) {
|
||||
return@setOnTouchListener mSimpleFingerGestures.onTouch(v,e)
|
||||
this.setOnTouchListener { v, event ->
|
||||
if (event.device.name?.contains(
|
||||
"JX-12",
|
||||
true
|
||||
) == true || event.device.name?.equals("J06", true) == true
|
||||
) {
|
||||
return@setOnTouchListener mSimpleFingerGestures.onTouch(v, event)
|
||||
} else {
|
||||
return@setOnTouchListener super.onTouchEvent(e)
|
||||
return@setOnTouchListener super.onTouchEvent(event)
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
val nullCursor = PointerIcon.getSystemIcon(context!!, PointerIcon.TYPE_NULL)
|
||||
this.setPointerIcon(nullCursor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
|
||||
this.setOnTouchListener { v,e ->
|
||||
if (e.device.name.contains("JX-12",true) == true) {
|
||||
return@setOnTouchListener mSimpleFingerGestures.onTouch(v,e)
|
||||
this.setOnTouchListener { v,event ->
|
||||
if (event.device.name?.contains("JX-12",true) == true|| event.device.name?.equals("J06",true) == true) {
|
||||
return@setOnTouchListener mSimpleFingerGestures.onTouch(v,event)
|
||||
} else {
|
||||
return@setOnTouchListener super.onTouchEvent(e)
|
||||
return@setOnTouchListener super.onTouchEvent(event)
|
||||
}
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
val nullCursor = PointerIcon.getSystemIcon(context!!, PointerIcon.TYPE_NULL)
|
||||
this.setPointerIcon(nullCursor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -96,7 +111,7 @@ open class BWebview : GeckoView {
|
||||
gestureDistance: Double
|
||||
): Boolean {
|
||||
Blog.LOGE("onPinch")
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onUnpinch(
|
||||
@ -122,7 +137,7 @@ open class BWebview : GeckoView {
|
||||
fingers: Int
|
||||
): Boolean {
|
||||
Blog.LOGE("onLongPress")
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onClick(
|
||||
@ -131,7 +146,7 @@ open class BWebview : GeckoView {
|
||||
): Boolean {
|
||||
Blog.LOGE("onClick")
|
||||
jxInteface?.invoke(JxEvent.ON_CLICK)
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +157,7 @@ open class BWebview : GeckoView {
|
||||
|
||||
var jxInteface : JxInteface? = null
|
||||
|
||||
|
||||
var lastDomain : String = ""
|
||||
|
||||
fun loadUrl(url: String) {
|
||||
if (this.isVisible == false) {
|
||||
@ -151,7 +166,7 @@ open class BWebview : GeckoView {
|
||||
Blog.LOGE("url >>>> ${url}")
|
||||
var nUrl = url
|
||||
if (url.startsWith("http") == false) {
|
||||
nUrl = BooktokiStruct.getLastedDoamin().plus(url)
|
||||
nUrl = lastDomain
|
||||
}
|
||||
nUrl?.let { url ->
|
||||
if (url.split("//").size > 1) {
|
||||
@ -171,7 +186,7 @@ open class BWebview : GeckoView {
|
||||
|
||||
override fun onTouchEvent(event: MotionEvent): Boolean {
|
||||
Blog.LOGE("event.device.name >>> ${event.device.name}")
|
||||
if (event.device.name.contains("JX-12", true)) {
|
||||
if (event.device.name?.contains("JX-12",true) == true || event.device.name?.equals("J06",true) == true) {
|
||||
Blog.LOGE("BWebview onTouchEvent $event")
|
||||
when (event.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
|
||||
@ -243,8 +243,8 @@ class PagedTextLayout : ConstraintLayout , PagedTextGenerateInterface {
|
||||
}
|
||||
|
||||
fun setPageBy(num : Int) {
|
||||
currentPage = num
|
||||
var realPage = if(isDualPage()) currentPage * 2 else currentPage
|
||||
this@PagedTextLayout.currentPage = num
|
||||
var realPage = if(isDualPage()) this@PagedTextLayout.currentPage * 2 else this@PagedTextLayout.currentPage
|
||||
Blog.LOGE("realPage = if(${pageList?.size} ?: 0 > ${realPage}) { realPage} else { ${(pageList?.size ?: 0) - 1 }}")
|
||||
realPage = if(pageList?.size ?: 0 > realPage) { realPage} else { (pageList?.size ?: 0) - 1 }
|
||||
currentPageTextView?.text = "${realPage + 1 }/${ pageList?.size ?: 0 + 1}"
|
||||
@ -260,25 +260,25 @@ class PagedTextLayout : ConstraintLayout , PagedTextGenerateInterface {
|
||||
|
||||
fun size(): Int = if(isDualPage()) Math.round((hiddenTextView?.size() ?:0) * 0.5f) else hiddenTextView?.size() ?: 0
|
||||
fun getFastPageCount() = if(isDualPage()) 3 else 6
|
||||
fun current(): Int = currentPage
|
||||
fun current(): Int = this@PagedTextLayout.currentPage
|
||||
fun doNext(fast : Boolean = false) {
|
||||
if (fast) {
|
||||
setPageBy(if((currentPage + getFastPageCount()) >= 0) {
|
||||
currentPage + getFastPageCount()
|
||||
setPageBy(if((this@PagedTextLayout.currentPage + getFastPageCount()) >= 0) {
|
||||
this@PagedTextLayout.currentPage + getFastPageCount()
|
||||
} else {size()})
|
||||
} else {
|
||||
setPageBy(currentPage.inc())
|
||||
setPageBy(this@PagedTextLayout.currentPage.inc())
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun doPrev(fast : Boolean = false) {
|
||||
if (fast) {
|
||||
setPageBy(if((currentPage - getFastPageCount()) >= 0) {
|
||||
currentPage - getFastPageCount()
|
||||
setPageBy(if((this@PagedTextLayout.currentPage - getFastPageCount()) >= 0) {
|
||||
this@PagedTextLayout.currentPage - getFastPageCount()
|
||||
} else {0})
|
||||
} else {
|
||||
setPageBy(if(currentPage > 0 )currentPage.dec() else 0)
|
||||
setPageBy(if(this@PagedTextLayout.currentPage > 0 ) this@PagedTextLayout.currentPage.dec() else 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
package bums.lunatic.launcher.tokiz.webcontents.contentsinfo
|
||||
|
||||
|
||||
object BooktokiStruct : BaseWebContents() {
|
||||
|
||||
override var lastNumber : Int = 468
|
||||
|
||||
override fun getWebcontentsName(): String {
|
||||
return "Booktoki"
|
||||
}
|
||||
|
||||
override fun getLastedDoamin(): String {
|
||||
return String.format("https://booktoki%d.com", lastNumber)
|
||||
}
|
||||
|
||||
}
|
||||
//package bums.lunatic.launcher.tokiz.webcontents.contentsinfo
|
||||
//
|
||||
//
|
||||
//object BooktokiStruct : BaseWebContents() {
|
||||
//
|
||||
// override var lastNumber : Int = 468
|
||||
//
|
||||
// override fun getWebcontentsName(): String {
|
||||
// return "Booktoki"
|
||||
// }
|
||||
//
|
||||
// override fun getLastedDoamin(): String {
|
||||
// return String.format("https://booktoki%d.com", lastNumber)
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@ -2,8 +2,8 @@ package bums.lunatic.launcher.workers
|
||||
|
||||
import bums.lunatic.launcher.BuildConfig
|
||||
import bums.lunatic.launcher.apps.SimpleContact
|
||||
import bums.lunatic.launcher.tokiz.data.model.BookPageInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.BookPageInfos
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsPageInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.ContentsCollection
|
||||
import bums.lunatic.launcher.tokiz.data.model.HistoryItem
|
||||
import bums.lunatic.launcher.tokiz.data.model.LastInfo
|
||||
import bums.lunatic.launcher.tokiz.data.model.ReaderConfig
|
||||
@ -56,21 +56,12 @@ class CustMigration : AutomaticSchemaMigration {
|
||||
}
|
||||
object WorkersDb {
|
||||
|
||||
fun recommendApps() {
|
||||
val cal = Calendar.getInstance()
|
||||
cal.time = Date()
|
||||
val weekOfYear = cal.get(Calendar.WEEK_OF_YEAR)
|
||||
val weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH)
|
||||
val dayOfWeek = cal.get(Calendar.DAY_OF_WEEK)
|
||||
getRealm().apply {
|
||||
// this.query<UserActionModel>().query("weekOfYear == $0 OR weekOfMonth == $1 OR dayOfWeek == $2").limit()
|
||||
}
|
||||
}
|
||||
|
||||
val clazz : Set<KClass<out BaseRealmObject>> = setOf(RssData::class, NotificationItem::class, AppInfo::class,SimpleContact::class, RecentCall::class, RecentSms::class, CurrentPlayItem::class,
|
||||
TelegramBotUpdate::class, TelegramData::class, TelegramMessage::class, TelegramChat::class, BotCommandEentitie::class, TelegramFrom::class,
|
||||
WeatherForcast::class, Location::class, Current::class, Forecast::class, Condition::class, Forecastday::class, Day::class, Astro::class, Hour::class,
|
||||
LocationLog::class,
|
||||
LastInfo::class, HistoryItem::class, ReaderConfig::class, BookPageInfos::class, BookPageInfo::class
|
||||
LastInfo::class, HistoryItem::class, ReaderConfig::class, ContentsCollection::class, ContentsPageInfo::class
|
||||
)
|
||||
//,UserActionModel::class
|
||||
|
||||
|
||||
@ -1,25 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:id="@+id/intro_bg"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activity.Intro">
|
||||
|
||||
<!-- <WebView-->
|
||||
<!-- android:id="@+id/hidden_web"-->
|
||||
<!-- android:layout_margin="60dp"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintRight_toRightOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"/>-->
|
||||
|
||||
|
||||
>
|
||||
|
||||
<bums.lunatic.launcher.tokiz.view.BWebview
|
||||
android:id="@+id/menu_web"
|
||||
@ -31,9 +18,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/textview_title" />
|
||||
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:id="@+id/btn_home"
|
||||
android:layout_width="wrap_content"
|
||||
@ -73,21 +57,6 @@
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
/>
|
||||
|
||||
<!-- <androidx.constraintlayout.utils.widget.ImageFilterButton-->
|
||||
<!-- android:id="@+id/btn_rotate"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="@dimen/main_top_height"-->
|
||||
<!-- android:adjustViewBounds="true"-->
|
||||
<!-- android:scaleType="centerInside"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- android:src="@drawable/rotation"-->
|
||||
<!-- android:background="#8FFF"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toRightOf="@id/btn_list"-->
|
||||
<!-- app:layout_constraintRight_toLeftOf="@+id/btn_history"-->
|
||||
<!-- app:layout_constraintHorizontal_chainStyle="spread_inside"-->
|
||||
<!-- />-->
|
||||
|
||||
<androidx.constraintlayout.utils.widget.ImageFilterButton
|
||||
android:id="@+id/btn_history"
|
||||
android:layout_width="wrap_content"
|
||||
@ -147,7 +116,5 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@ -9,27 +9,18 @@
|
||||
android:id="@+id/mainFragmentsContainer"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragment_container"
|
||||
android:visibility="visible"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/base_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tabs"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp">
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/home"
|
||||
android:visibility="visible"
|
||||
android:name="bums.lunatic.launcher.home.LauncherHome"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
app:layout_constraintBottom_toTopOf="@id/tabs"/>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/booktoki"
|
||||
android:visibility="gone"
|
||||
android:name="bums.lunatic.launcher.tokiz.Novels"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</FrameLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/tabs"
|
||||
@ -52,7 +43,27 @@
|
||||
android:layout_height="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:text="booktoki"
|
||||
android:id="@+id/book"
|
||||
android:id="@+id/books"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/tabs_black"
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:text="newtoki"
|
||||
android:id="@+id/webtoons"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/tabs_black"
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatRadioButton
|
||||
android:text="manatoki"
|
||||
android:id="@+id/comics"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:layout_weight="1"
|
||||
|
||||
@ -23,11 +23,23 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
|
||||
<bums.lunatic.launcher.home.GeckoWeb
|
||||
android:id="@+id/geckoWeb"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
app:layout_constraintTop_toTopOf="@id/geckoWeb"
|
||||
app:layout_constraintLeft_toLeftOf="@id/geckoWeb"
|
||||
app:layout_constraintRight_toRightOf="@id/geckoWeb"
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="4dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:visibility="visible"
|
||||
android:indeterminate="false"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Loading…
x
Reference in New Issue
Block a user