summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhuiyan <huiyan@codeaurora.org>2016-05-31 17:54:38 +0800
committerLikai Ding <likaid@codeaurora.org>2016-06-28 10:24:36 +0800
commit391b17fca58392701b4a601c2390220a48145530 (patch)
tree1c4434ead502c6ee0915e94c5bf616df5eeb24a1
parent83dae75ad4f5696756eac9c571219bfedfd5022a (diff)
downloadandroid_packages_apps_Gallery2-391b17fca58392701b4a601c2390220a48145530.tar.gz
android_packages_apps_Gallery2-391b17fca58392701b4a601c2390220a48145530.tar.bz2
android_packages_apps_Gallery2-391b17fca58392701b4a601c2390220a48145530.zip
Gallery2: Fix white gallery screen before showing photo
Put a white cover View in front of the SurfaceView and hide it after the first draw. This prevents the SurfaceView being transparent before the first draw. So can see the white screen at first. Set the cover View to the black color if start gallery with view single photo action, which can match the background of photopage to avoid see the white screen. Change-Id: I0b3766eb6023f9bcdb7e0329dcafb978b3dc1557 CRs-Fixed: 1021668
-rw-r--r--src/com/android/gallery3d/app/GalleryActivity.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/GalleryActivity.java b/src/com/android/gallery3d/app/GalleryActivity.java
index 2237fc9c7..4e5beabad 100644
--- a/src/com/android/gallery3d/app/GalleryActivity.java
+++ b/src/com/android/gallery3d/app/GalleryActivity.java
@@ -31,6 +31,7 @@ import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
+import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
@@ -601,6 +602,9 @@ public final class GalleryActivity extends AbstractGalleryActivity implements On
data.putString(PhotoPage.KEY_MEDIA_SET_PATH, albumPath.toString());
}
data.putBoolean("SingleItemOnly", singleItemOnly);
+ // set the cover View to black
+ View cover = findViewById(R.id.gl_root_cover);
+ cover.setBackgroundColor(Color.BLACK);
getStateManager().startState(SinglePhotoPage.class, data);
}
}