So I made this WebView app with a webpage and another googlemap activity, but the webview is running really slow(the page loads slower than it should and the scrolling is very slow and laggy), and I've tried:
Change the page
android:hardwareAccelerated
LAYER_TYPE_SOFTWARE
LAYER_TYPE_HARDWARE
setRenderPriority(deprecated, I know)
webSET.setDatabaseEnabled(true);
webSET.setDomStorageEnabled(true);
webSET.setAppCacheEnabled(true);
webSET.setCacheMode(WebSettings.LOAD_NO_CACHE);
Nothing seems to be working. I can't get why it is so slow And also the text is weird. Google chrome runs the page really good. Some pictures: https://www.dropbox.com/sc/cgqs05pm1v4qrdr/AADFe17cWdjQnhjDOHaLjinIa
EDIT: I am trying to configure XWalk, but I am having problems MainActivity.java package com.gvglive.gvglive;
import android.provider.ContactsContract;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import org.chromium.content_public.browser.WebContents;
import org.xwalk.core.XWalkPreferences;
import org.xwalk.core.XWalkView;
public class MainActivity extends ActionBarActivity {
private XWalkView mWB;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWB=(XWalkView)findViewById(R.id.mWB);
mWB.load("http://gvglive.com/", null);
}
}
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gvglive.gvglive" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<org.xwalk.core.XWalkView
android:id="@+id/mWB"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</RelativeLayout>
build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.gvglive.gvglive"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'org.xwalk:xwalk_core_library:12.41.296.5'
}
Any help would be appreciated.