mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-16 14:07:28 +01:00
Fix splash screen icon on Android 12 (#5565)
* Use Core Splashscreen for splashscreen stuff * Keep splash screen until activity ready Ready as in the data inside starting screen is finished showing * Use custom splash screen exit animation on older android version * Add splash screen minimum duration to prevent exit jank * Fix broken AMOLED theme * Improvements
This commit is contained in:
@@ -197,3 +197,20 @@ inline fun TextView.setMaxLinesAndEllipsize(_ellipsize: TextUtils.TruncateAt = T
|
||||
maxLines = (measuredHeight - paddingTop - paddingBottom) / lineHeight
|
||||
ellipsize = _ellipsize
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback will be run immediately when no animation running
|
||||
*/
|
||||
fun RecyclerView.onAnimationsFinished(callback: (RecyclerView) -> Unit) = post(
|
||||
object : Runnable {
|
||||
override fun run() {
|
||||
if (isAnimating) {
|
||||
itemAnimator?.isRunning {
|
||||
post(this)
|
||||
}
|
||||
} else {
|
||||
callback(this@onAnimationsFinished)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user