mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化翻页动画
This commit is contained in:
parent
589fe363e6
commit
9c3f8a466c
@ -66,7 +66,7 @@ class PageView(context: Context) : FrameLayout(context) {
|
||||
|
||||
fun getBitmap(): Bitmap? {
|
||||
synchronized(this) {
|
||||
return bitmap
|
||||
return bitmap?.copy(Bitmap.Config.ARGB_8888, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,15 +20,15 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie
|
||||
when (mDirection) {
|
||||
PageDirection.PREV -> {
|
||||
prevBitmap?.recycle()
|
||||
prevBitmap = prevPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false)
|
||||
prevBitmap = prevPage.getBitmap()
|
||||
curBitmap?.recycle()
|
||||
curBitmap = curPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false)
|
||||
curBitmap = curPage.getBitmap()
|
||||
}
|
||||
PageDirection.NEXT -> {
|
||||
nextBitmap?.recycle()
|
||||
nextBitmap = nextPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false)
|
||||
nextBitmap = nextPage.getBitmap()
|
||||
curBitmap?.recycle()
|
||||
curBitmap = curPage.getBitmap()?.copy(Bitmap.Config.ARGB_8888, false)
|
||||
curBitmap = curPage.getBitmap()
|
||||
}
|
||||
else -> Unit
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user