mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Merge pull request #12 from brion/flicker
(provisional) Disable fade-in effect on images in Android 2.3
This commit is contained in:
commit
8a02baaabc
1 changed files with 9 additions and 2 deletions
|
|
@ -92,8 +92,15 @@ public class Utils {
|
|||
public static DisplayImageOptions.Builder getGenericDisplayOptions() {
|
||||
if(defaultImageOptionsBuilder == null) {
|
||||
defaultImageOptionsBuilder = new DisplayImageOptions.Builder().cacheInMemory()
|
||||
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
|
||||
.displayer(new FadeInBitmapDisplayer(300))
|
||||
.imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
// List views flicker badly during data updates on Android 2.3; we
|
||||
// haven't quite figured out why but cells seem to be rearranged oddly.
|
||||
// Disable the fade-in on 2.3 to reduce the effect.
|
||||
defaultImageOptionsBuilder = defaultImageOptionsBuilder
|
||||
.displayer(new FadeInBitmapDisplayer(300));
|
||||
}
|
||||
defaultImageOptionsBuilder = defaultImageOptionsBuilder
|
||||
.cacheInMemory()
|
||||
.resetViewBeforeLoading();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue