Drop support for Android 5.x

It's 5-6 years old, and only accounts for 2% of users in the Firebase analytics.
This commit is contained in:
arkon
2021-03-30 23:15:17 -04:00
parent 1657f04d55
commit 443024cebb
15 changed files with 37 additions and 91 deletions

View File

@@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.widget
import android.animation.ObjectAnimator
import android.animation.StateListAnimator
import android.content.Context
import android.os.Build
import android.util.AttributeSet
import com.google.android.material.R
import com.google.android.material.appbar.AppBarLayout
@@ -20,12 +19,7 @@ class ElevationAppBarLayout @JvmOverloads constructor(
}
fun enableElevation(liftOnScroll: Boolean) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
// Delay to avoid crash
post { setElevation(liftOnScroll) }
} else {
setElevation(liftOnScroll)
}
setElevation(liftOnScroll)
}
private fun setElevation(liftOnScroll: Boolean) {

View File

@@ -49,10 +49,8 @@ class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: Att
* @param centerX x starting point
* @param centerY y starting point
* @param listener animation listener
*
* @return sdk version lower then 21
*/
fun showRevealEffect(centerX: Int, centerY: Int, listener: Animator.AnimatorListener): Boolean {
fun showRevealEffect(centerX: Int, centerY: Int, listener: Animator.AnimatorListener) {
this.isVisible = true
val height = this.height
@@ -71,6 +69,5 @@ class RevealAnimationView @JvmOverloads constructor(context: Context, attrs: Att
anim.addListener(listener)
anim.start()
return true
}
}