Skip to content

Commit 5dc28d2

Browse files
elsadenyfriederbluemle
authored andcommitted
Migrate to androidx
1 parent 7ee7af9 commit 5dc28d2

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

app/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 22
5-
buildToolsVersion '25.0.0'
6-
4+
compileSdkVersion 29
5+
buildToolsVersion '29.0.2'
76
defaultConfig {
87
applicationId "cpr.name.videoenabledwebview"
9-
minSdkVersion 8
10-
targetSdkVersion 22
8+
minSdkVersion 15
9+
targetSdkVersion 29
1110
versionCode 2
1211
versionName "1.0.1"
1312
}
@@ -20,6 +19,6 @@ android {
2019
}
2120

2221
dependencies {
23-
compile fileTree(dir: 'libs', include: ['*.jar'])
24-
compile 'com.android.support:appcompat-v7:22.0.0'
22+
implementation fileTree(dir: 'libs', include: ['*.jar'])
23+
implementation 'androidx.appcompat:appcompat:1.1.0'
2524
}

app/src/main/java/name/cpr/ExampleActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package name.cpr;
22

33
import android.os.Bundle;
4-
import android.support.v7.app.ActionBarActivity;
54
import android.view.View;
65
import android.view.ViewGroup;
76
import android.view.WindowManager;
87
import android.webkit.WebView;
98
import android.webkit.WebViewClient;
109

10+
import androidx.appcompat.app.AppCompatActivity;
1111
import cpr.name.videoenabledwebview.R;
1212

13-
public class ExampleActivity extends ActionBarActivity
13+
public class ExampleActivity extends AppCompatActivity
1414
{
1515
private VideoEnabledWebView webView;
1616
private VideoEnabledWebChromeClient webChromeClient;
@@ -76,7 +76,7 @@ public void toggledFullscreen(boolean fullscreen)
7676
webView.setWebViewClient(new InsideWebViewClient());
7777

7878
// Navigate anywhere you want, but consider that this classes have only been tested on YouTube's mobile site
79-
webView.loadUrl("http://m.youtube.com");
79+
webView.loadUrl("https://www.youtube.com/watch?v=HGZYtDZhOEQ");
8080

8181
}
8282

0 commit comments

Comments
 (0)