summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/FilterShowActivity.java
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-02-11 18:15:15 -0800
committernicolasroard <nicolasroard@google.com>2013-02-11 18:22:47 -0800
commitd3b009b2c15c607c0b4bcc72412c45d231e26ca2 (patch)
tree2fab572796bd2841c48c603c09a8e0ba25294b07 /src/com/android/gallery3d/filtershow/FilterShowActivity.java
parent83eeb942e8eda7da94303eb1c105164c253cdbba (diff)
downloadandroid_packages_apps_Snap-d3b009b2c15c607c0b4bcc72412c45d231e26ca2.tar.gz
android_packages_apps_Snap-d3b009b2c15c607c0b4bcc72412c45d231e26ca2.tar.bz2
android_packages_apps_Snap-d3b009b2c15c607c0b4bcc72412c45d231e26ca2.zip
Adding support for ICS
Change-Id: I550d461b08a4cc5ceb3cdefd82301d5986325184
Diffstat (limited to 'src/com/android/gallery3d/filtershow/FilterShowActivity.java')
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index f061842cd..912446d88 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -83,7 +83,6 @@ import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.Vector;
-@TargetApi(16)
public class FilterShowActivity extends Activity implements OnItemClickListener,
OnShareTargetSelectedListener {
@@ -464,9 +463,11 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
loading.setVisibility(View.GONE);
final View filters = findViewById(R.id.filtersPanel);
filters.setVisibility(View.VISIBLE);
- float y = filters.getY();
- filters.setY(y + filters.getHeight());
- filters.animate().setDuration(600).y(y).withLayer().start();
+ if (PanelController.useAnimations()) {
+ float y = filters.getY();
+ filters.setY(y + filters.getHeight());
+ filters.animate().setDuration(600).y(y).withLayer().start();
+ }
final View imageShow = findViewById(R.id.imageShow);
imageShow.setVisibility(View.VISIBLE);
@@ -859,7 +860,8 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
int translate = translateMainPanel(viewList);
if (!mShowingImageStatePanel) {
mShowingImageStatePanel = true;
- view.animate().setDuration(200).x(translate)
+ if (PanelController.useAnimations()) {
+ view.animate().setDuration(200).x(translate)
.withLayer().withEndAction(new Runnable() {
@Override
public void run() {
@@ -869,11 +871,18 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
.alpha(1.0f).start();
}
}).start();
+ } else {
+ view.setX(translate);
+ }
} else {
mShowingImageStatePanel = false;
viewList.setVisibility(View.INVISIBLE);
- view.animate().setDuration(200).x(0).withLayer()
+ if (PanelController.useAnimations()) {
+ view.animate().setDuration(200).x(0).withLayer()
.start();
+ } else {
+ view.setX(0);
+ }
}
invalidateOptionsMenu();
}
@@ -917,7 +926,8 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
int translate = translateMainPanel(viewList);
if (!mShowingHistoryPanel) {
mShowingHistoryPanel = true;
- view.animate().setDuration(200).x(translate)
+ if (PanelController.useAnimations()) {
+ view.animate().setDuration(200).x(translate)
.withLayer().withEndAction(new Runnable() {
@Override
public void run() {
@@ -927,11 +937,18 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
.alpha(1.0f).start();
}
}).start();
+ } else {
+ view.setX(translate);
+ }
} else {
mShowingHistoryPanel = false;
viewList.setVisibility(View.INVISIBLE);
- view.animate().setDuration(200).x(0).withLayer()
+ if (PanelController.useAnimations()) {
+ view.animate().setDuration(200).x(0).withLayer()
.start();
+ } else {
+ view.setX(0);
+ }
}
invalidateOptionsMenu();
}