From 39db7f4c3d7b8f3d68ef1a8881b69624b721f6c6 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 17 Apr 2021 17:08:19 -0700 Subject: Start hilt injection --- .../main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web') 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) -- cgit v1.2.3