move to another module

This commit is contained in:
Vladimir 2020-10-01 18:30:15 +03:00
parent 6821c5b3f3
commit 2fc1dcc3a1
13 changed files with 78 additions and 27 deletions

View File

@ -63,6 +63,7 @@ gradle.ext.roboswag = [
'base-map',
'yandex-map',
'google-map',
'webview',
'encrypted-shared-prefs'
]

View File

@ -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)
}

View File

@ -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>

1
webview/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

44
webview/build.gradle Normal file
View File

@ -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()
}

View File

@ -0,0 +1,2 @@
<manifest
package="ru.touchin.roboswag.webview"/>

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,7 @@
package ru.touchin.roboswag.webview.web_view
interface WebViewCallback {
fun onStateChanged(newState: WebViewLoadingState)
}

View File

@ -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"

View File

@ -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>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>