aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/NestedWebView.kt')
-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)