Closed yuwono95 closed 6 years ago
I didn't see the mBGSizeIndex = LARGE_BG;
in my code. The intention of this piece of codes is used to determine which bitmap size is fit for current screen resolution and mode(portrait or landscape). So I don't think it will always be in LARGE_BG
Please pay attention to the method
Line 183: newIndex = LARGE_BG;
Line 199: if mBGSizeIndex
not equals to newIndex
then set mBGSizeIndex = newIndex;
Line 206: hence at the end of the method, mBGSizeIndex
will always have value = LARGE_BG
楼主说的是对的,这一块的逻辑走到最后 mBGSizeIndex = LARGE_BG,导致在低尺寸的手机上也会加载大图。
I believe this has been fixed. Thanks.
https://github.com/eschao/android-PageFlip/blob/09d2755a021981eb791b586bd56b484ef14cb1f4/Sample/src/main/java/com/eschao/android/widget/sample/pageflip/LoadBitmapTask.java#L206
By the end of this method, variable
mBGSizeIndex
will always have value equals to LARGE_BG. Is this by intention? If it is, we could rewrite this method like below:Regards.