From c8ba7d3f871bb7f4487ea54430f22b7a479b52b0 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 17 Apr 2014 15:09:41 +0200 Subject: [PATCH] Make camera affordance fly away Stop gap measure to differenciate the accepted vs rejected response of the camera affordance on the lockscreen. Bug: 14081010 Change-Id: I04d170aa3f07ce5f440fb1d27f7c62ef2a903a03 --- .../systemui/statusbar/phone/NavigationBarView.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index db26a42a858eb..7ca672d0ab986 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -205,6 +205,15 @@ public class NavigationBarView extends LinearLayout { mContext.startActivityAsUser( new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE), UserHandle.CURRENT); + cameraButtonView.animate().x(-cameraButtonView.getWidth()) + .setInterpolator(new AccelerateInterpolator(2f)).withEndAction( + new Runnable() { + @Override + public void run() { + cameraButtonView.setTranslationX(0); + } + }); + mSkipCancelAnimation = true; } if (realX < mStartX - mScaledTouchSlop) { mTouchSlopReached = true;