Skip to content

Commit

Permalink
htmlgames: smoother games (fixes #4927)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avinash-Codes committed Jan 1, 2025
1 parent ad144be commit 1f7d2f7
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -27,15 +28,17 @@ class WebViewActivity : AppCompatActivity() {
fromDeepLink = !TextUtils.isEmpty(dataFromDeepLink)
val title: String? = intent.getStringExtra("title")
link = intent.getStringExtra("link") ?: ""
if (title == "2048") {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
} else {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
}
clearCookie()
if (!TextUtils.isEmpty(title)) {
activityWebViewBinding.contentWebView.webTitle.text = title
}
activityWebViewBinding.contentWebView.pBar.max = 100
activityWebViewBinding.contentWebView.pBar.progress = 0
setListeners()
setupWebView()
activityWebViewBinding.contentWebView.wv.loadUrl(link)
activityWebViewBinding.contentWebView.finish.setOnClickListener { finish() }
setWebClient()
}
Expand Down

0 comments on commit 1f7d2f7

Please sign in to comment.