mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化翻页动画
This commit is contained in:
parent
9c3f8a466c
commit
f27081e49b
@ -65,18 +65,15 @@ class PageView(context: Context) : FrameLayout(context) {
|
||||
}
|
||||
|
||||
fun getBitmap(): Bitmap? {
|
||||
synchronized(this) {
|
||||
return bitmap?.copy(Bitmap.Config.ARGB_8888, false)
|
||||
}
|
||||
return bitmap?.copy(Bitmap.Config.ARGB_8888, false)
|
||||
}
|
||||
|
||||
private fun upBitmap() {
|
||||
Coroutine.async {
|
||||
val screenshot = screenshot()
|
||||
screenshot()
|
||||
}.onSuccess {
|
||||
val tmp = bitmap
|
||||
synchronized(this@PageView) {
|
||||
bitmap = screenshot
|
||||
}
|
||||
bitmap = it
|
||||
tmp?.recycle()
|
||||
}.onError {
|
||||
AppLog.put("更新PageView图片出错", it)
|
||||
|
Loading…
Reference in New Issue
Block a user