move to another module
This commit is contained in:
parent
6821c5b3f3
commit
2fc1dcc3a1
|
|
@ -63,6 +63,7 @@ gradle.ext.roboswag = [
|
|||
'base-map',
|
||||
'yandex-map',
|
||||
'google-map',
|
||||
'webview',
|
||||
'encrypted-shared-prefs'
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
package ru.touchin.roboswag.views.widget.web_view
|
||||
|
||||
import ru.touchin.roboswag.views.widget.web_view.WebViewLoadingState
|
||||
|
||||
interface WebViewCallback {
|
||||
|
||||
fun onStateChanged(newState: WebViewLoadingState)
|
||||
|
||||
}
|
||||
|
|
@ -34,14 +34,4 @@
|
|||
<attr name="stubText" format="string"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="BaseWebView">
|
||||
<attr name="screenBackground" format="reference"/>
|
||||
<attr name="errorText" format="string"/>
|
||||
<attr name="repeatButtonText" format="string"/>
|
||||
<attr name="repeatButtonBackground" format="reference"/>
|
||||
<attr name="repeatButtonTextAppearance" format="reference"/>
|
||||
<attr name="errorTextAppearance" format="reference"/>
|
||||
<attr name="progressBarTintColor" format="color"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
apply from: "../android-configs/lib-config.gradle"
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(":views")
|
||||
implementation project(":kotlin-extensions")
|
||||
|
||||
implementation "com.google.android.material:material"
|
||||
implementation "androidx.constraintlayout:constraintlayout"
|
||||
implementation "androidx.core:core-ktx"
|
||||
|
||||
constraints {
|
||||
implementation("com.google.android.material:material") {
|
||||
version {
|
||||
require '1.0.0'
|
||||
}
|
||||
}
|
||||
implementation("androidx.constraintlayout:constraintlayout") {
|
||||
version {
|
||||
require '2.0.0-beta4'
|
||||
}
|
||||
}
|
||||
implementation("androidx.core:core-ktx") {
|
||||
version {
|
||||
require '1.3.1'
|
||||
}
|
||||
}
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib") {
|
||||
version {
|
||||
require '1.3.0'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<manifest
|
||||
package="ru.touchin.roboswag.webview"/>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.touchin.roboswag.views.widget.web_view
|
||||
package ru.touchin.roboswag.webview.web_view
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
|
|
@ -11,10 +11,9 @@ import android.webkit.WebView
|
|||
import androidx.core.content.withStyledAttributes
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import ru.touchin.extensions.setOnRippleClickListener
|
||||
import ru.touchin.roboswag.components.utils.UiUtils
|
||||
import ru.touchin.roboswag.views.R
|
||||
import ru.touchin.roboswag.views.databinding.BaseWebViewBinding
|
||||
import ru.touchin.roboswag.views.widget.Switcher
|
||||
import ru.touchin.roboswag.webview.R
|
||||
import ru.touchin.roboswag.webview.databinding.BaseWebViewBinding
|
||||
|
||||
open class BaseWebView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.touchin.roboswag.views.widget.web_view
|
||||
package ru.touchin.roboswag.webview.web_view
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.net.http.SslError
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.touchin.roboswag.views.widget.web_view
|
||||
package ru.touchin.roboswag.webview.web_view
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package ru.touchin.roboswag.webview.web_view
|
||||
|
||||
interface WebViewCallback {
|
||||
|
||||
fun onStateChanged(newState: WebViewLoadingState)
|
||||
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ru.touchin.roboswag.views.widget.web_view.CustomWebView
|
||||
<ru.touchin.roboswag.webview.web_view.CustomWebView
|
||||
android:id="@+id/web_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/error_text"
|
||||
style="@style/Text.Regular"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="32dp"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<declare-styleable name="BaseWebView">
|
||||
<attr name="screenBackground" format="reference"/>
|
||||
<attr name="errorText" format="string"/>
|
||||
<attr name="repeatButtonText" format="string"/>
|
||||
<attr name="repeatButtonBackground" format="reference"/>
|
||||
<attr name="repeatButtonTextAppearance" format="reference"/>
|
||||
<attr name="errorTextAppearance" format="reference"/>
|
||||
<attr name="progressBarTintColor" format="color"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
Loading…
Reference in New Issue