From 74c2c56019016af7c0aba6e3cf43cddb940ba4ac Mon Sep 17 00:00:00 2001 From: elsadeny Date: Wed, 13 Feb 2019 05:04:05 +0800 Subject: [PATCH] migrated to androidx --- app/app.iml | 114 +++++++++++++----- app/build.gradle | 12 +- .../main/java/name/cpr/ExampleActivity.java | 6 +- build.gradle | 4 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 5 files changed, 96 insertions(+), 44 deletions(-) diff --git a/app/app.iml b/app/app.iml index 1391042..421fd8a 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + @@ -22,25 +22,24 @@ - - - + + + - - - - + + + - - - - + + + + @@ -55,6 +54,13 @@ + + + + + + + @@ -62,13 +68,6 @@ - - - - - - - @@ -76,34 +75,85 @@ - + + + + + + + + + + + - + + + + + - - - - + + + + + + + - + + + + + + + - + + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 04af8f7..000b5b5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 22 - buildToolsVersion '25.0.0' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { applicationId "cpr.name.videoenabledwebview" - minSdkVersion 8 - targetSdkVersion 22 + minSdkVersion 14 + targetSdkVersion 28 versionCode 2 versionName "1.0.1" } @@ -20,6 +20,6 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.0.0' + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation "androidx.appcompat:appcompat:1.0.0" } diff --git a/app/src/main/java/name/cpr/ExampleActivity.java b/app/src/main/java/name/cpr/ExampleActivity.java index 5e594bb..672fb36 100644 --- a/app/src/main/java/name/cpr/ExampleActivity.java +++ b/app/src/main/java/name/cpr/ExampleActivity.java @@ -1,16 +1,16 @@ package name.cpr; import android.os.Bundle; -import android.support.v7.app.ActionBarActivity; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.webkit.WebView; import android.webkit.WebViewClient; +import androidx.appcompat.app.AppCompatActivity; import cpr.name.videoenabledwebview.R; -public class ExampleActivity extends ActionBarActivity +public class ExampleActivity extends AppCompatActivity { private VideoEnabledWebView webView; private VideoEnabledWebChromeClient webChromeClient; @@ -76,7 +76,7 @@ public void toggledFullscreen(boolean fullscreen) webView.setWebViewClient(new InsideWebViewClient()); // Navigate anywhere you want, but consider that this classes have only been tested on YouTube's mobile site - webView.loadUrl("http://m.youtube.com"); + webView.loadUrl("https://www.youtube.com/watch?v=cvqEAw1pGMw"); } diff --git a/build.gradle b/build.gradle index 5966013..d8ad1d0 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,10 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -15,5 +16,6 @@ buildscript { allprojects { repositories { jcenter() + google() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b6adb51..3d97b28 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Oct 16 21:46:15 PDT 2017 +#Wed Feb 13 04:35:26 CST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip