├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── layout │ │ │ ├── activity_index.xml │ │ │ └── activity_main.xml │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ └── drawable │ │ │ └── ic_launcher_background.xml │ │ ├── assets │ │ ├── images │ │ │ ├── header.jpg │ │ │ ├── ygs_small.jpg │ │ │ ├── cropped-ryg.png │ │ │ ├── cropped-ryg-1-32x32.png │ │ │ ├── cropped-ryg-1-192x192.png │ │ │ ├── 0d572f5dce2fba1175f7970c9e76a47f.png │ │ │ ├── 2f7b11077e5c22320f3d8fbb40f2604c.png │ │ │ ├── 457c3796dba92ea464ad55a25a9c1027.png │ │ │ ├── 4bb4fde28ff305c350cb97791ec8c147.png │ │ │ ├── 527fb8232d1c925833c1a74c9a338228.png │ │ │ ├── 70696ed7df0fb375cab28a8c197a7643.png │ │ │ ├── 762784f64563e97d7eebe580f425e7bc.png │ │ │ ├── 799e623541ac888a6b45444180503e14.png │ │ │ ├── 7b8f5227da6477a4e2a7aebe9f65b0a3.png │ │ │ ├── 8500d206dec8a7ca186836bfa670bb6e.png │ │ │ ├── 95ccef9f30cd0ef2e2f3b4b577c7f9a5.png │ │ │ ├── 9ec347970e814fad30eac681216dcc5e.png │ │ │ ├── a317bc3fcb4234e8b2743b8ea7e18ebd.png │ │ │ ├── d14f2d0d63934af4abd8253b020b3625.png │ │ │ ├── f5bbf272059f28d7c8a522e48bc37157.png │ │ │ └── fab6cf9350832e789a511146e11e3698.png │ │ └── css │ │ │ └── style.css │ │ ├── java │ │ └── me │ │ │ └── mundane │ │ │ └── acceleratedwebview │ │ │ ├── ui │ │ │ ├── IndexActivity.java │ │ │ └── YuGangShuoWebActivity.java │ │ │ ├── utils │ │ │ ├── WebViewUtil.java │ │ │ ├── DataHelper.java │ │ │ └── ACache.java │ │ │ └── DemoApplication.java │ │ └── AndroidManifest.xml ├── build.gradle └── proguard-rules.pro ├── README.md ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AcceleratedWebView -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AcceleratedWebView 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/assets/images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/header.jpg -------------------------------------------------------------------------------- /app/src/main/assets/images/ygs_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/ygs_small.jpg -------------------------------------------------------------------------------- /app/src/main/assets/images/cropped-ryg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/cropped-ryg.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/assets/images/cropped-ryg-1-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/cropped-ryg-1-32x32.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/assets/images/cropped-ryg-1-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/cropped-ryg-1-192x192.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/assets/images/0d572f5dce2fba1175f7970c9e76a47f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/0d572f5dce2fba1175f7970c9e76a47f.png -------------------------------------------------------------------------------- /app/src/main/assets/images/2f7b11077e5c22320f3d8fbb40f2604c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/2f7b11077e5c22320f3d8fbb40f2604c.png -------------------------------------------------------------------------------- /app/src/main/assets/images/457c3796dba92ea464ad55a25a9c1027.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/457c3796dba92ea464ad55a25a9c1027.png -------------------------------------------------------------------------------- /app/src/main/assets/images/4bb4fde28ff305c350cb97791ec8c147.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/4bb4fde28ff305c350cb97791ec8c147.png -------------------------------------------------------------------------------- /app/src/main/assets/images/527fb8232d1c925833c1a74c9a338228.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/527fb8232d1c925833c1a74c9a338228.png -------------------------------------------------------------------------------- /app/src/main/assets/images/70696ed7df0fb375cab28a8c197a7643.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/70696ed7df0fb375cab28a8c197a7643.png -------------------------------------------------------------------------------- /app/src/main/assets/images/762784f64563e97d7eebe580f425e7bc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/762784f64563e97d7eebe580f425e7bc.png -------------------------------------------------------------------------------- /app/src/main/assets/images/799e623541ac888a6b45444180503e14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/799e623541ac888a6b45444180503e14.png -------------------------------------------------------------------------------- /app/src/main/assets/images/7b8f5227da6477a4e2a7aebe9f65b0a3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/7b8f5227da6477a4e2a7aebe9f65b0a3.png -------------------------------------------------------------------------------- /app/src/main/assets/images/8500d206dec8a7ca186836bfa670bb6e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/8500d206dec8a7ca186836bfa670bb6e.png -------------------------------------------------------------------------------- /app/src/main/assets/images/95ccef9f30cd0ef2e2f3b4b577c7f9a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/95ccef9f30cd0ef2e2f3b4b577c7f9a5.png -------------------------------------------------------------------------------- /app/src/main/assets/images/9ec347970e814fad30eac681216dcc5e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/9ec347970e814fad30eac681216dcc5e.png -------------------------------------------------------------------------------- /app/src/main/assets/images/a317bc3fcb4234e8b2743b8ea7e18ebd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/a317bc3fcb4234e8b2743b8ea7e18ebd.png -------------------------------------------------------------------------------- /app/src/main/assets/images/d14f2d0d63934af4abd8253b020b3625.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/d14f2d0d63934af4abd8253b020b3625.png -------------------------------------------------------------------------------- /app/src/main/assets/images/f5bbf272059f28d7c8a522e48bc37157.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/f5bbf272059f28d7c8a522e48bc37157.png -------------------------------------------------------------------------------- /app/src/main/assets/images/fab6cf9350832e789a511146e11e3698.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mundane799699/AcceleratedWebView/HEAD/app/src/main/assets/images/fab6cf9350832e789a511146e11e3698.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Aug 25 22:09:35 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/java/me/mundane/acceleratedwebview/ui/IndexActivity.java: -------------------------------------------------------------------------------- 1 | package me.mundane.acceleratedwebview.ui; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.view.View; 6 | import me.mundane.acceleratedwebview.R; 7 | 8 | public class IndexActivity extends AppCompatActivity { 9 | 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_index); 14 | } 15 | 16 | public void yugangshuoBeforeOptimize(View view) { 17 | YuGangShuoWebActivity.go2YuGangShuoActivity(this, false); 18 | } 19 | 20 | public void yugangshuoAfterOptimize(View view) { 21 | YuGangShuoWebActivity.go2YuGangShuoActivity(this, true); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | defaultConfig { 6 | applicationId "me.mundane.acceleratedwebview" 7 | minSdkVersion 16 8 | targetSdkVersion 25 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(dir: 'libs', include: ['*.jar']) 23 | implementation 'com.android.support:appcompat-v7:25.3.1' 24 | implementation 'com.android.support.constraint:constraint-layout:1.1.2' 25 | } 26 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/java/me/mundane/acceleratedwebview/utils/WebViewUtil.java: -------------------------------------------------------------------------------- 1 | package me.mundane.acceleratedwebview.utils; 2 | 3 | import android.os.Build; 4 | import android.view.ViewGroup; 5 | import android.view.ViewParent; 6 | import android.webkit.WebSettings; 7 | import android.webkit.WebView; 8 | 9 | /** 10 | * Created by mundane on 2018/8/26 上午12:50 11 | */ 12 | 13 | public class WebViewUtil { 14 | public static void configWebView(WebView webView) { 15 | WebSettings webSettings = webView.getSettings(); 16 | webSettings.setCacheMode(WebSettings.LOAD_DEFAULT); 17 | webSettings.setGeolocationEnabled(true); 18 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { 19 | webSettings.setMixedContentMode(android.webkit.WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); 20 | } 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_index.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 |