diff options
| author | John Reck <jreck@google.com> | 2012-10-25 10:08:37 -0700 |
|---|---|---|
| committer | John Reck <jreck@google.com> | 2012-10-25 17:42:21 -0700 |
| commit | 00914f56c3390caa224b1c9fc07624665de40113 (patch) | |
| tree | d13e5a10c14b8920e59dbdb610b060ec19e988f0 /src/com | |
| parent | 6cfd3b8d34cf627b3b41bf53e9ceb70f9d0ed17f (diff) | |
| download | android_packages_apps_Gallery2-00914f56c3390caa224b1c9fc07624665de40113.tar.gz android_packages_apps_Gallery2-00914f56c3390caa224b1c9fc07624665de40113.tar.bz2 android_packages_apps_Gallery2-00914f56c3390caa224b1c9fc07624665de40113.zip | |
Add loading spinner
Bug: 7408575
Change-Id: Ia737b36abb88d75381f41c25474e3cc03448dbb9
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index 0a6bb2dd3..95b7af069 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -393,6 +393,10 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, } private void startLoadBitmap(Uri uri) { + final View filters = findViewById(R.id.filtersPanel); + final View loading = findViewById(R.id.loading); + loading.setVisibility(View.VISIBLE); + filters.setVisibility(View.INVISIBLE); View tinyPlanetView = findViewById(R.id.tinyplanetButton); if (tinyPlanetView != null) { tinyPlanetView.setVisibility(View.GONE); @@ -413,10 +417,21 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, @Override protected Boolean doInBackground(Uri... params) { mImageLoader.loadBitmap(params[0], mBitmapSize); + publishProgress(); return mImageLoader.queryLightCycle360(); } @Override + protected void onProgressUpdate(Void... values) { + super.onProgressUpdate(values); + if (isCancelled()) return; + final View filters = findViewById(R.id.filtersPanel); + final View loading = findViewById(R.id.loading); + loading.setVisibility(View.GONE); + filters.setVisibility(View.VISIBLE); + } + + @Override protected void onPostExecute(Boolean result) { if (isCancelled()) { return; |
