Files
another-widget/app/src/main/java/com/tommasoberlose/anotherwidget/components/FixedFocusScrollView.kt
Tommaso Berlose e1d2f5a782 Update the UI
2020-05-20 20:46:21 +02:00

24 lines
556 B
Kotlin

package com.tommasoberlose.anotherwidget.components
import android.content.Context
import android.graphics.Rect
import android.util.AttributeSet
import android.util.Log
import android.view.View
import android.widget.ScrollView
class FixedFocusScrollView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
) : ScrollView(context, attrs, defStyle) {
var isScrollable = true
override fun scrollTo(x: Int, y: Int) {
if (isScrollable) {
super.scrollTo(x, y)
}
}
}