|
|
@ -15,14 +15,11 @@ import kotlin.math.max |
|
|
|
import kotlin.math.min |
|
|
|
import kotlin.math.min |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
open class InertiaScrollTextView : AppCompatTextView { |
|
|
|
@Suppress("unused") |
|
|
|
constructor(context: Context) : super(context) |
|
|
|
open class InertiaScrollTextView @JvmOverloads constructor( |
|
|
|
|
|
|
|
context: Context, |
|
|
|
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) |
|
|
|
attrs: AttributeSet? = null |
|
|
|
|
|
|
|
) : AppCompatTextView(context, attrs) { |
|
|
|
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) |
|
|
|
|
|
|
|
: super(context, attrs, defStyleAttr) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private val scrollStateIdle = 0 |
|
|
|
private val scrollStateIdle = 0 |
|
|
|
private val scrollStateDragging = 1 |
|
|
|
private val scrollStateDragging = 1 |
|
|
@ -218,7 +215,7 @@ open class InertiaScrollTextView : AppCompatTextView { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
internal fun postOnAnimation() { |
|
|
|
fun postOnAnimation() { |
|
|
|
if (mEatRunOnAnimationRequest) { |
|
|
|
if (mEatRunOnAnimationRequest) { |
|
|
|
mReSchedulePostAnimationCallback = true |
|
|
|
mReSchedulePostAnimationCallback = true |
|
|
|
} else { |
|
|
|
} else { |
|
|
|