This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.animation.ObjectAnimator | |
import android.app.Activity | |
import android.view.View | |
import android.view.ViewGroup | |
fun ViewGroup.doOnPanRequest(f: (v: View, requestedTranslationY: Float) -> Unit) { | |
val initTranslationY = translationY | |
setOnApplyWindowInsetsListener { layout, insets -> | |
(this.context as? Activity)?.window?.let { w -> | |
w.currentFocus?.let { focusedView -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.os.Build | |
import android.text.Html | |
import android.text.SpannableStringBuilder | |
import android.text.Spanned | |
import android.text.SpannedString | |
import android.text.method.LinkMovementMethod | |
import android.text.style.ClickableSpan | |
import android.text.style.URLSpan | |
import android.view.View |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Job | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.launch | |
/* | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled |