Commit 62b46051 authored by John Reck's avatar John Reck Committed by Android Git Automerger
Browse files

am c62b066a: am 6106c833: Merge "Add loading spinner" into gb-ub-photos-arches

* commit 'c62b066a':
  Add loading spinner
parents 485797d7 c62b066a
......@@ -141,11 +141,21 @@
android:visibility="gone" />
</com.android.gallery3d.filtershow.CenteredLinearLayout>
<ProgressBar
android:id="@+id/loading"
style="@android:style/Widget.Holo.ProgressBar.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
android:indeterminateOnly="true" />
</FrameLayout>
<com.android.gallery3d.filtershow.CenteredLinearLayout
xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
android:id="@+id/mainPanel"
android:id="@+id/filtersPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......@@ -380,7 +390,6 @@
<com.android.gallery3d.filtershow.CenteredLinearLayout
xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
android:id="@+id/mainPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
......
......@@ -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,9 +417,20 @@ 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()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment