aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-04-17 17:08:19 -0700
committerAllan Wang <me@allanwang.ca>2021-04-17 17:08:19 -0700
commit39db7f4c3d7b8f3d68ef1a8881b69624b721f6c6 (patch)
treecb24b739861219861b651aa064a91432f30c681b /app/src/main/kotlin/com/pitchedapps/frost/web
parent88a5d17814ff9f7c44f79216510d405f057ae454 (diff)
downloadfrost-39db7f4c3d7b8f3d68ef1a8881b69624b721f6c6.tar.gz
frost-39db7f4c3d7b8f3d68ef1a8881b69624b721f6c6.tar.bz2
frost-39db7f4c3d7b8f3d68ef1a8881b69624b721f6c6.zip
Start hilt injection
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt
index da0ebf0d..294c2ac1 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt
@@ -30,12 +30,17 @@ import androidx.core.view.ViewCompat
*
* Webview extension that handles nested scrolls
*/
-open class NestedWebView @JvmOverloads constructor(
+open class NestedWebView(
context: Context,
- attrs: AttributeSet? = null,
- defStyleAttr: Int = 0
+ attrs: AttributeSet?,
+ defStyleAttr: Int
) : WebView(context, attrs, defStyleAttr), NestedScrollingChild {
+ // No JvmOverloads due to hilt
+ constructor(context: Context) : this(context, null)
+
+ constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
+
private lateinit var childHelper: NestedScrollingChildHelper
private var lastY: Int = 0
private val scrollOffset = IntArray(2)