diff options
Diffstat (limited to 'src/com/android/launcher3/widget/WidgetsFullSheet.java')
-rw-r--r-- | src/com/android/launcher3/widget/WidgetsFullSheet.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/launcher3/widget/WidgetsFullSheet.java b/src/com/android/launcher3/widget/WidgetsFullSheet.java index ec06d1e6d..521f5117a 100644 --- a/src/com/android/launcher3/widget/WidgetsFullSheet.java +++ b/src/com/android/launcher3/widget/WidgetsFullSheet.java @@ -17,6 +17,8 @@ package com.android.launcher3.widget; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; +import android.animation.AnimatorSet; +import android.animation.ObjectAnimator; import android.animation.PropertyValuesHolder; import android.content.Context; import android.graphics.Rect; @@ -27,6 +29,9 @@ import android.view.MotionEvent; import android.view.View; import android.view.animation.AnimationUtils; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; + import com.android.launcher3.Insettable; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAppState; @@ -35,8 +40,6 @@ import com.android.launcher3.R; import com.android.launcher3.views.RecyclerViewFastScroller; import com.android.launcher3.views.TopRoundedCornerView; -import androidx.annotation.VisibleForTesting; - /** * Popup for showing the full list of available widgets */ @@ -235,4 +238,13 @@ public class WidgetsFullSheet extends BaseWidgetSheet protected int getElementsRowCount() { return mAdapter.getItemCount(); } + + @Nullable + @Override + public Animator createHintCloseAnim(float distanceToMove) { + AnimatorSet anim = new AnimatorSet(); + anim.play(ObjectAnimator.ofFloat(mRecyclerView, TRANSLATION_Y, -distanceToMove)); + anim.play(ObjectAnimator.ofFloat(mRecyclerView, ALPHA, 0.5f)); + return anim; + } } |