Drop support for Android 5.x
This commit is contained in:
@@ -298,23 +298,17 @@ class MangaController :
|
||||
fab.setOnClickListener {
|
||||
val item = presenter.getNextUnreadChapter()
|
||||
if (item != null) {
|
||||
// Create animation listener
|
||||
val revealAnimationListener: Animator.AnimatorListener = object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationStart(animation: Animator?) {
|
||||
openChapter(item.chapter, true)
|
||||
}
|
||||
}
|
||||
|
||||
// Get coordinates and start animation
|
||||
actionFab?.getCoordinates()?.let { coordinates ->
|
||||
if (!binding.revealView.showRevealEffect(
|
||||
coordinates.x,
|
||||
coordinates.y,
|
||||
revealAnimationListener
|
||||
)
|
||||
) {
|
||||
openChapter(item.chapter)
|
||||
}
|
||||
binding.revealView.showRevealEffect(
|
||||
coordinates.x,
|
||||
coordinates.y,
|
||||
object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationStart(animation: Animator?) {
|
||||
openChapter(item.chapter, true)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
} else {
|
||||
view?.context?.toast(R.string.no_next_chapter)
|
||||
|
||||
@@ -304,18 +304,6 @@ class MangaInfoHeaderAdapter(
|
||||
initialLoad = false
|
||||
}
|
||||
}
|
||||
|
||||
// backgroundTint attribute doesn't work properly on Android 5
|
||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
|
||||
listOf(binding.backdropOverlay, binding.mangaInfoToggleMoreScrim)
|
||||
.forEach {
|
||||
@Suppress("DEPRECATION")
|
||||
it.background.setColorFilter(
|
||||
view.context.getResourceColor(android.R.attr.colorBackground),
|
||||
PorterDuff.Mode.SRC_ATOP
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showMangaInfo(visible: Boolean) {
|
||||
|
||||
Reference in New Issue
Block a user