Skip to content

Commit

Permalink
* added another fix for the slow scrolling on the web view after upda…
Browse files Browse the repository at this point in the history
…ting to Android API 28
  • Loading branch information
thanksmister committed Oct 20, 2019
1 parent 8d28aa9 commit 2da06a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion WallPanelApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ apply plugin: 'com.google.gms.google-services'
def versionMajor = 0
def versionMinor = 8
def versionPatch = 9
def versionBuild = 0 // bump for dog food builds, public betas, etc.
def versionBuild = 1 // bump for dog food builds, public betas, etc.

android {
kapt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ class BrowserActivityNative : BrowserActivity() {
false
}

if (configuration.hardwareAccelerated && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// chromium, enable hardware acceleration
mWebView?.setLayerType(View.LAYER_TYPE_HARDWARE, null);
} else {
// older android version, disable hardware acceleration
mWebView?.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}

configureWebSettings(configuration.browserUserAgent)
loadUrl(configuration.appLaunchUrl)
}
Expand Down

0 comments on commit 2da06a4

Please sign in to comment.