...
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply from: 'maven_publish.gradle'
|
||||
|
||||
android {
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk 14
|
||||
//noinspection ExpiredTargetSdkVersion
|
||||
targetSdk 31
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
consumerProguardFiles 'proguard-rules.pro'
|
||||
}
|
||||
namespace 'com.wuadam.awesomewebview'
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
// https://developer.android.com/build/publish-library/configure-pub-variants?hl=zh-cn#single-pub-var
|
||||
// https://stackoverflow.com/a/71366104
|
||||
publishing {
|
||||
singleVariant('release') {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.annotation:annotation:1.7.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'com.google.android.material:material:1.10.0'
|
||||
implementation 'com.nineoldandroids:library:2.4.0'
|
||||
implementation project(':utils')
|
||||
// implementation("com.thefinestartist:utils:0.9.5")
|
||||
|
||||
|
||||
// api ('com.yanzhenjie:permission:2.0.3') {
|
||||
// exclude group: 'com.android.support'
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
plugins {
|
||||
id ("com.android.library")
|
||||
id ("kotlin-android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "kr.lunaticbum.awesomewebview"
|
||||
compileSdk = 34
|
||||
|
||||
defaultConfig {
|
||||
// applicationId = "kr.lunaticbum.awesomewebview"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
// versionCode = 1
|
||||
// versionName = "0.0.1"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
dataBinding = true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation ("androidx.annotation:annotation:1.9.1")
|
||||
implementation ("androidx.appcompat:appcompat:1.7.0")
|
||||
implementation ("com.google.android.material:material:1.12.0")
|
||||
// implementation ("com.nineoldandroids:library:2.4.0")
|
||||
implementation ("androidx.core:core-ktx:1.13.1")
|
||||
implementation(project(":utils"))
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<application>
|
||||
<provider
|
||||
android:name=".helpers.FileProvider4WebView"
|
||||
android:name="kr.lunaticbum.awesomewebview.helpers.FileProvider4WebView"
|
||||
android:authorities="${applicationId}.awesome_web_view.file_provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.enums;
|
||||
package kr.lunaticbum.awesomewebview.enums;
|
||||
|
||||
/**
|
||||
* Created by Leonardo on 11/14/15.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Base64;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import android.graphics.Color;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
/**
|
||||
* Created by wuzongheng on 2018/2/18.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.helpers;
|
||||
package kr.lunaticbum.awesomewebview.helpers;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.jsInterface;
|
||||
package kr.lunaticbum.awesomewebview.jsInterface;
|
||||
|
||||
import android.webkit.JavascriptInterface;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.jsInterface;
|
||||
package kr.lunaticbum.awesomewebview.jsInterface;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Pair;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.jsInterface;
|
||||
package kr.lunaticbum.awesomewebview.jsInterface;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Handler;
|
||||
@@ -7,7 +7,7 @@ import android.util.Log;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import com.wuadam.awesomewebview.views.VideoEnabledWebChromeClient;
|
||||
import kr.lunaticbum.awesomewebview.views.VideoEnabledWebChromeClient;
|
||||
|
||||
public class VideoJsHelper {
|
||||
private VideoEnabledWebChromeClient videoEnabledWebChromeClient;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.listeners;
|
||||
package kr.lunaticbum.awesomewebview.listeners;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.listeners;
|
||||
package kr.lunaticbum.awesomewebview.listeners;
|
||||
|
||||
/**
|
||||
* Created by TheFinestArtist on 1/26/16.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.objects;
|
||||
package kr.lunaticbum.awesomewebview.objects;
|
||||
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.views;
|
||||
package kr.lunaticbum.awesomewebview.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
@@ -13,7 +13,7 @@ import androidx.core.content.ContextCompat;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.wuadam.awesomewebview.R;
|
||||
import kr.lunaticbum.awesomewebview.R;
|
||||
|
||||
|
||||
/**
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.views;
|
||||
package kr.lunaticbum.awesomewebview.views;
|
||||
|
||||
import android.media.MediaPlayer;
|
||||
import android.view.SurfaceView;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.wuadam.awesomewebview.views;
|
||||
package kr.lunaticbum.awesomewebview.views;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
@@ -6,7 +6,7 @@ import android.util.AttributeSet;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import com.wuadam.awesomewebview.jsInterface.VideoJsHelper;
|
||||
import kr.lunaticbum.awesomewebview.jsInterface.VideoJsHelper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,75 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/coordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/finestWhite">
|
||||
<layout>
|
||||
<data>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/webLayout"
|
||||
</data>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/coordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/toolbarHeight" />
|
||||
android:background="@color/finestWhite">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:elevation="0dp">
|
||||
<FrameLayout
|
||||
android:id="@+id/webLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/toolbarHeight" />
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="0dp"
|
||||
app:contentInsetEnd="0dp"
|
||||
app:contentInsetLeft="0dp"
|
||||
app:contentInsetRight="0dp"
|
||||
app:contentInsetStart="0dp">
|
||||
app:elevation="0dp">
|
||||
|
||||
<include layout="@layout/toolbar_content" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="0dp"
|
||||
app:contentInsetEnd="0dp"
|
||||
app:contentInsetLeft="0dp"
|
||||
app:contentInsetRight="0dp"
|
||||
app:contentInsetStart="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/gradient"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/defaultDividerHeight"
|
||||
android:layout_marginTop="@dimen/toolbarHeight"
|
||||
android:background="@color/finestBlack10" />
|
||||
<include layout="@layout/toolbar_content" />
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/defaultProgressBarHeight"
|
||||
android:layout_marginTop="@dimen/toolbarHeight"
|
||||
android:indeterminate="false"
|
||||
android:progressDrawable="@drawable/progress_drawable" />
|
||||
<View
|
||||
android:id="@+id/gradient"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/defaultDividerHeight"
|
||||
android:layout_marginTop="@dimen/toolbarHeight"
|
||||
android:background="@color/finestBlack10" />
|
||||
|
||||
<include layout="@layout/menus" />
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/defaultProgressBarHeight"
|
||||
android:layout_marginTop="@dimen/toolbarHeight"
|
||||
android:indeterminate="false"
|
||||
android:progressDrawable="@drawable/progress_drawable" />
|
||||
|
||||
<!-- View where the video will be shown when video goes fullscreen -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/videoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:visibility="invisible">
|
||||
<include layout="@layout/menus" />
|
||||
|
||||
<!-- View that will be shown while the fullscreen video loads. For example you could include
|
||||
a "Loading..." message. However, in this particular example this view is actually defined in
|
||||
view_loading_video.xml and inflated programmatically in ExampleActivity.java. The reason for
|
||||
this is to keep the main layout (this file) cleaner. -->
|
||||
<!-- <View
|
||||
android:id="@+id/videoLoading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="invisible" /> -->
|
||||
<!-- View where the video will be shown when video goes fullscreen -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/videoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/black"
|
||||
android:visibility="invisible">
|
||||
|
||||
</RelativeLayout>
|
||||
<!-- View that will be shown while the fullscreen video loads. For example you could include
|
||||
a "Loading..." message. However, in this particular example this view is actually defined in
|
||||
view_loading_video.xml and inflated programmatically in ExampleActivity.java. The reason for
|
||||
this is to keep the main layout (this file) cleaner. -->
|
||||
<!-- <View
|
||||
android:id="@+id/videoLoading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="invisible" /> -->
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</layout>
|
||||
@@ -10,7 +10,7 @@
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.wuadam.awesomewebview.views.ShadowLayout
|
||||
<kr.lunaticbum.awesomewebview.views.ShadowLayout
|
||||
android:id="@+id/shadowLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -141,5 +141,5 @@
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.wuadam.awesomewebview.views.ShadowLayout>
|
||||
</kr.lunaticbum.awesomewebview.views.ShadowLayout>
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user