From f357eff0eca21d8cc77c965ae5a8768a421a976f Mon Sep 17 00:00:00 2001 From: Avinash Sharma <133222313+Avinash-Codes@users.noreply.github.com> Date: Tue, 7 Jan 2025 00:23:30 +0530 Subject: [PATCH] resources: smoother html apps (fixes #4927) (#4942) Co-authored-by: dogi --- app/build.gradle | 4 ++-- .../java/org/ole/planet/myplanet/ui/viewer/WebViewActivity.kt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3da4054948..906d71c321 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 26 targetSdkVersion 34 - versionCode 2165 - versionName "0.21.65" + versionCode 2166 + versionName "0.21.66" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/viewer/WebViewActivity.kt b/app/src/main/java/org/ole/planet/myplanet/ui/viewer/WebViewActivity.kt index 6137b079a9..4e4fa7cdd0 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/viewer/WebViewActivity.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/viewer/WebViewActivity.kt @@ -1,5 +1,6 @@ package org.ole.planet.myplanet.ui.viewer +import android.content.pm.ActivityInfo import android.graphics.Bitmap import android.net.Uri import android.os.Build @@ -27,7 +28,6 @@ class WebViewActivity : AppCompatActivity() { val title: String? = intent.getStringExtra("title") link = intent.getStringExtra("link") ?: "" val resourceId = intent.getStringExtra("RESOURCE_ID") - clearCookie() if (!TextUtils.isEmpty(title)) { activityWebViewBinding.contentWebView.webTitle.text = title @@ -43,6 +43,7 @@ class WebViewActivity : AppCompatActivity() { val indexFile = File(directory, "index.html") if (indexFile.exists()) { + requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT activityWebViewBinding.contentWebView.wv.loadUrl("file://${indexFile.absolutePath}") } } else {