Change Overview Actions to round buttons.
If floating search is active in Overview (flag enabled and we are
the active Launcher), these buttons will be aligned to the search
bar relative to the bottom of the screen. Otherwise, the buttons
will be aligned below the active task like before.
Demo for Launcher3 build:
https://drive.google.com/file/d/1fVzRRnW5AFDMPkW-E8_w4BOCzTAOURQ_/view?usp=drive_link&resourcekey=0-6-EbFZXkBqcu0rw7uuEzjw
Bug: 292000892
Test: Manual with floating enabled/disabled and
SEPARATE_RECENTS_ACTIVITY enabled/disabled (simulating not being
the active Launcher). Also tested with a 3P Launcher, Nova.
Flag: N/A; this change is enabled by default, but also verified
UI looks correct with ENABLE_FLOATING_SEARCH_BAR.
Change-Id: Ia45f88d2c691c4525b1e73cca4707498d058a917
diff --git a/quickstep/res/drawable/ic_screenshot.xml b/quickstep/res/drawable/ic_screenshot.xml
index 9ee6c44..ea10661 100644
--- a/quickstep/res/drawable/ic_screenshot.xml
+++ b/quickstep/res/drawable/ic_screenshot.xml
@@ -1,32 +1,10 @@
-<!-- Copyright (C) 2020 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="20dp"
- android:viewportWidth="20"
- android:viewportHeight="20">
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
<path
- android:pathData="M5.8334,1.666H8.3334V3.3327H5.8334V6.666H4.1667V3.3327C4.1667,2.4122 4.9129,1.666 5.8334,1.666Z"
- android:fillColor="#000000"/>
- <path
- android:pathData="M4.1667,13.3327V16.666C4.1667,17.5865 4.9129,18.3327 5.8334,18.3327H8.3334V16.666H5.8334V13.3327H4.1667Z"
- android:fillColor="#000000"/>
- <path
- android:pathData="M14.1667,13.3327V16.666H11.6667V18.3327H14.1667C15.0872,18.3327 15.8334,17.5865 15.8334,16.666V13.3327H14.1667Z"
- android:fillColor="#000000"/>
- <path
- android:pathData="M15.8334,6.666V3.3327C15.8334,2.4122 15.0872,1.666 14.1667,1.666H11.6667V3.3327H14.1667V6.666H15.8334Z"
- android:fillColor="#000000"/>
-</vector>
\ No newline at end of file
+ android:pathData="M5,4C5,2.343 6.343,1 8,1L16,1C17.657,1 19,2.343 19,4L19,20C19,21.657 17.657,23 16,23L8,23C6.343,23 5,21.657 5,20L5,4ZM8,3C7.448,3 7,3.448 7,4L7,20C7,20.552 7.448,21 8,21L16,21C16.552,21 17,20.552 17,20L17,4C17,3.448 16.552,3 16,3L8,3ZM8,4L8,8L9.5,8L9.5,5.5L12,5.5L12,4L8,4ZM16,16L16,20L12,20L12,18.5L14.5,18.5L14.5,16L16,16Z"
+ android:fillColor="@color/overview_button"
+ android:fillType="evenOdd"/>
+</vector>
diff --git a/quickstep/res/layout/fallback_recents_activity.xml b/quickstep/res/layout/fallback_recents_activity.xml
index bfeb82d..f0ea09c 100644
--- a/quickstep/res/layout/fallback_recents_activity.xml
+++ b/quickstep/res/layout/fallback_recents_activity.xml
@@ -15,6 +15,7 @@
-->
<com.android.launcher3.LauncherRootView
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
index 0fda0bf..2192a64 100644
--- a/quickstep/res/layout/overview_actions_container.xml
+++ b/quickstep/res/layout/overview_actions_container.xml
@@ -22,7 +22,7 @@
<LinearLayout
android:id="@+id/action_buttons"
android:layout_width="match_parent"
- android:layout_height="@dimen/overview_actions_height"
+ android:layout_height="@dimen/overview_actions_size"
android:layout_gravity="bottom|center_horizontal"
android:orientation="horizontal">
@@ -31,13 +31,14 @@
android:layout_height="1dp"
android:layout_weight="1" />
- <Button
+ <ImageButton
android:id="@+id/action_screenshot"
style="@style/OverviewActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableStart="@drawable/ic_screenshot"
- android:text="@string/action_screenshot"
+ android:layout_width="@dimen/overview_actions_size"
+ android:layout_height="@dimen/overview_actions_size"
+ android:gravity="center"
+ android:src="@drawable/ic_screenshot"
+ android:contentDescription="@string/action_screenshot"
android:theme="@style/ThemeControlHighlightWorkspaceColor" />
<Space
@@ -46,12 +47,14 @@
android:layout_height="1dp"
android:visibility="gone" />
- <Button
+ <ImageButton
android:id="@+id/action_split"
style="@style/OverviewActionButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/action_split"
+ android:layout_width="@dimen/overview_actions_size"
+ android:layout_height="@dimen/overview_actions_size"
+ android:gravity="center"
+ android:src="@drawable/ic_split_vertical"
+ android:contentDescription="@string/action_split"
android:theme="@style/ThemeControlHighlightWorkspaceColor"
android:visibility="gone" />
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index b0e91a1..88f1478 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -50,8 +50,10 @@
<!-- Overrideable in overlay that provides the Overview Actions. -->
<dimen name="overview_actions_top_margin">24dp</dimen>
- <dimen name="overview_actions_height">48dp</dimen>
+ <dimen name="overview_actions_size">60dp</dimen>
<dimen name="overview_actions_button_spacing">36dp</dimen>
+ <!-- 12dp + 156dp floating search pill width (note this is in addition to normal 36dp) -->
+ <dimen name="overview_actions_additional_floating_search_spacing">168dp</dimen>
<!-- These speeds are in dp/s -->
<dimen name="max_task_dismiss_drag_velocity">2.25dp</dimen>
diff --git a/quickstep/res/values/styles.xml b/quickstep/res/values/styles.xml
index fc03704..0c4e782 100644
--- a/quickstep/res/values/styles.xml
+++ b/quickstep/res/values/styles.xml
@@ -221,15 +221,10 @@
<item name="android:colorControlHighlight">?attr/workspaceTextColor</item>
</style>
- <style name="OverviewActionButton"
- parent="@android:style/Widget.DeviceDefault.Button.Borderless">
- <item name="android:paddingTop">4dp</item>
- <item name="android:paddingBottom">4dp</item>
- <item name="android:textColor">@color/overview_button</item>
+ <style name="OverviewActionButton" parent="@android:style/Widget.DeviceDefault.ImageButton">
+ <item name="android:background">@drawable/circle_btn_bg</item>
+ <item name="android:backgroundTint">?androidprv:attr/materialColorSurfaceBright</item>
<item name="android:drawableTint">@color/overview_button</item>
- <item name="android:tint">?android:attr/textColorPrimary</item>
- <item name="android:drawablePadding">8dp</item>
- <item name="android:textAllCaps">false</item>
</style>
<style name="OverviewClearAllButton" parent="@android:style/Widget.DeviceDefault.Button">
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
index 396d0ab..fecdd79 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java
@@ -125,8 +125,33 @@
@Override
public int getFloatingSearchBarRestingMarginBottom(Launcher launcher) {
- return areElementsVisible(launcher, FLOATING_SEARCH_BAR) ? 0
- : super.getFloatingSearchBarRestingMarginBottom(launcher);
+ if (!areElementsVisible(launcher, FLOATING_SEARCH_BAR)) {
+ return super.getFloatingSearchBarRestingMarginBottom(launcher);
+ }
+ RecentsView recentsView = launcher.getOverviewPanel();
+ DeviceProfile dp = launcher.getDeviceProfile();
+ int activeTaskMarginBottom = LayoutUtils.getShelfTrackingDistance(launcher, dp,
+ recentsView.getPagedOrientationHandler());
+ // Center between task bottom and bottom of the screen.
+ return (activeTaskMarginBottom - dp.overviewActionsHeight) / 2
+ - launcher.getResources().getDimensionPixelSize(R.dimen.qsb_shadow_height);
+ }
+
+ @Override
+ public int getFloatingSearchBarRestingMarginStart(Launcher launcher) {
+ return getFloatingSearchBarRestingMarginHorizontal(launcher);
+ }
+
+ @Override
+ public int getFloatingSearchBarRestingMarginEnd(Launcher launcher) {
+ return getFloatingSearchBarRestingMarginHorizontal(launcher);
+ }
+
+ private static int getFloatingSearchBarRestingMarginHorizontal(Launcher launcher) {
+ // Width if the search bar were to be expanded (focused).
+ int expandedWidth = launcher.getResources().getDimensionPixelSize(
+ R.dimen.overview_floating_search_width);
+ return (launcher.getDeviceProfile().widthPx - expandedWidth) / 2;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index 80e5a54..5e488cc 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -20,6 +20,7 @@
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.CLEAR_ALL_BUTTON;
import static com.android.launcher3.LauncherState.EDIT_MODE;
+import static com.android.launcher3.LauncherState.FLOATING_SEARCH_BAR;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
@@ -99,6 +100,12 @@
}
@Override
+ public boolean isFloatingSearchVisible() {
+ return FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get()
+ && OVERVIEW.areElementsVisible(mActivity, FLOATING_SEARCH_BAR);
+ }
+
+ @Override
protected void onTaskLaunchAnimationEnd(boolean success) {
if (success) {
mActivity.getStateManager().moveToRestState();
diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
index e47c089..754d1ff 100644
--- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
+++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java
@@ -22,12 +22,14 @@
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
-import android.widget.Button;
import android.widget.FrameLayout;
+import android.widget.ImageButton;
import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
+import com.android.launcher3.BaseActivity;
+import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Insettable;
import com.android.launcher3.R;
@@ -49,6 +51,7 @@
implements OnClickListener, Insettable {
private final Rect mInsets = new Rect();
+ private BaseDraggingActivity mActivity;
@IntDef(flag = true, value = {
HIDDEN_NON_ZERO_ROTATION,
@@ -96,7 +99,7 @@
public static final int FLAG_SINGLE_TASK = 1 << 0;
private MultiValueAlpha mMultiValueAlpha;
- private Button mSplitButton;
+ private ImageButton mSplitButton;
@ActionsHiddenFlags
private int mHiddenFlags;
@@ -132,6 +135,8 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
+ mActivity = BaseActivity.fromContext(getContext());
+
mMultiValueAlpha = new MultiValueAlpha(findViewById(R.id.action_buttons), NUM_ALPHAS);
mMultiValueAlpha.setUpdateVisibility(true);
@@ -273,7 +278,7 @@
LayoutParams actionParams = (LayoutParams) findViewById(
R.id.action_buttons).getLayoutParams();
actionParams.setMargins(
- actionParams.leftMargin, mDp.overviewActionsTopMarginPx,
+ actionParams.leftMargin, 0,
actionParams.rightMargin, getBottomMargin());
}
@@ -286,6 +291,11 @@
return mDp.stashedTaskbarHeight;
}
+ if (isFloatingSearchVisible()) {
+ // Center between task and bottom of the screen.
+ return (mDp.heightPx - mTaskSize.bottom - mDp.overviewActionsHeight) / 2;
+ }
+
// Align to bottom of task Rect.
return mDp.heightPx - mTaskSize.bottom - mDp.overviewActionsTopMarginPx
- mDp.overviewActionsHeight;
@@ -301,9 +311,12 @@
requestLayout();
- mSplitButton.setCompoundDrawablesRelativeWithIntrinsicBounds(
- (dp.isLandscape ? R.drawable.ic_split_horizontal : R.drawable.ic_split_vertical),
- 0, 0, 0);
+ mSplitButton.setImageResource(
+ dp.isLandscape ? R.drawable.ic_split_horizontal : R.drawable.ic_split_vertical);
+ }
+
+ protected boolean isFloatingSearchVisible() {
+ return ((RecentsView) mActivity.getOverviewPanel()).isFloatingSearchVisible();
}
/**
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index a21bbe1..0071927 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -5220,6 +5220,11 @@
});
}
+ /** @return {@code true} if floating search bar is visible in Recents. */
+ public boolean isFloatingSearchVisible() {
+ return false;
+ }
+
public RemoteTargetHandle[] getRemoteTargetHandles() {
return mRemoteTargetHandles;
}
diff --git a/res/color/overview_button.xml b/res/color/overview_button.xml
index 1dd8da6..ccc042a 100644
--- a/res/color/overview_button.xml
+++ b/res/color/overview_button.xml
@@ -3,10 +3,10 @@
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<item
android:alpha="1"
- android:color="?androidprv:attr/materialColorOnSurface"
+ android:color="?androidprv:attr/materialColorOnSurfaceVariant"
android:state_enabled="true" />
<item
android:alpha="?android:disabledAlpha"
- android:color="?androidprv:attr/materialColorOnSurface"
+ android:color="?androidprv:attr/materialColorOnSurfaceVariant"
android:state_enabled="false" />
</selector>
\ No newline at end of file
diff --git a/res/drawable/circle_btn_bg.xml b/res/drawable/circle_btn_bg.xml
new file mode 100644
index 0000000..ad59ea5
--- /dev/null
+++ b/res/drawable/circle_btn_bg.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="@color/accent_ripple_color">
+ <item android:id="@android:id/mask">
+ <shape android:shape="oval">
+ <solid android:color="@android:color/white" />
+ </shape>
+ </item>
+ <item>
+ <shape android:shape="oval">
+ <solid android:color="@android:color/white" />
+ </shape>
+ </item>
+</ripple>
diff --git a/res/drawable/ic_split_horizontal.xml b/res/drawable/ic_split_horizontal.xml
index 2efd2b9..875b1be 100644
--- a/res/drawable/ic_split_horizontal.xml
+++ b/res/drawable/ic_split_horizontal.xml
@@ -5,5 +5,5 @@
android:viewportHeight="24">
<path
android:pathData="M4,6L9,6L9,18L4,18L4,6ZM2,6L2,18C2,19.1 2.9,20 4,20L9,20C10.1,20 11,19.1 11,18L11,6C11,4.9 10.1,4 9,4L4,4C2.9,4 2,4.9 2,6ZM15,6L20,6L20,18L15,18L15,6ZM13,6L13,18C13,19.1 13.9,20 15,20L20,20C21.1,20 22,19.1 22,18L22,6C22,4.9 21.1,4 20,4L15,4C13.9,4 13,4.9 13,6Z"
- android:fillColor="#000000"/>
+ android:fillColor="@color/overview_button"/>
</vector>
diff --git a/res/drawable/ic_split_vertical.xml b/res/drawable/ic_split_vertical.xml
index 9bc9785..e73a1b2 100644
--- a/res/drawable/ic_split_vertical.xml
+++ b/res/drawable/ic_split_vertical.xml
@@ -5,5 +5,5 @@
android:viewportHeight="24">
<path
android:pathData="M18,4V9H6V4H18ZM18,2H6C4.9,2 4,2.9 4,4V9C4,10.1 4.9,11 6,11H18C19.1,11 20,10.1 20,9V4C20,2.9 19.1,2 18,2ZM18,15V20H6V15H18ZM18,13H6C4.9,13 4,13.9 4,15V20C4,21.1 4.9,22 6,22H18C19.1,22 20,21.1 20,20V15C20,13.9 19.1,13 18,13Z"
- android:fillColor="#000000"/>
+ android:fillColor="@color/overview_button"/>
</vector>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 1079e00..bea86fa 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -396,10 +396,12 @@
<dimen name="task_thumbnail_icon_drawable_size">0dp</dimen>
<dimen name="task_thumbnail_icon_drawable_size_grid">0dp</dimen>
<dimen name="overview_task_margin">0dp</dimen>
- <dimen name="overview_actions_height">0dp</dimen>
+ <dimen name="overview_actions_size">0dp</dimen>
<dimen name="overview_actions_button_spacing">0dp</dimen>
<dimen name="overview_actions_margin_gesture">0dp</dimen>
<dimen name="overview_actions_top_margin">0dp</dimen>
+ <!-- Width if the search bar were to be full-size in Overview. Note pill is 192dp smaller. -->
+ <dimen name="overview_floating_search_width">348dp</dimen>
<dimen name="overview_grid_side_margin">0dp</dimen>
<dimen name="overview_grid_row_spacing">0dp</dimen>
<dimen name="overview_page_spacing">0dp</dimen>
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 54965e8..791ee53 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -581,13 +581,11 @@
overviewTaskIconDrawableSizeGridPx =
res.getDimensionPixelSize(R.dimen.task_thumbnail_icon_drawable_size_grid);
overviewTaskThumbnailTopMarginPx = overviewTaskIconSizePx + overviewTaskMarginPx;
- // Don't add margin with floating search bar to minimize risk of overlapping.
- overviewActionsTopMarginPx = FeatureFlags.ENABLE_FLOATING_SEARCH_BAR.get() ? 0
- : res.getDimensionPixelSize(R.dimen.overview_actions_top_margin);
+ overviewActionsTopMarginPx = res.getDimensionPixelSize(R.dimen.overview_actions_top_margin);
overviewPageSpacing = res.getDimensionPixelSize(R.dimen.overview_page_spacing);
overviewActionsButtonSpacing = res.getDimensionPixelSize(
R.dimen.overview_actions_button_spacing);
- overviewActionsHeight = res.getDimensionPixelSize(R.dimen.overview_actions_height);
+ overviewActionsHeight = res.getDimensionPixelSize(R.dimen.overview_actions_size);
overviewRowSpacing = res.getDimensionPixelSize(R.dimen.overview_grid_row_spacing);
overviewGridSideMargin = res.getDimensionPixelSize(R.dimen.overview_grid_side_margin);
diff --git a/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java b/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java
index 2501801..54ac655 100644
--- a/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java
+++ b/tests/src/com/android/launcher3/util/viewcapture_analysis/AlphaJumpDetector.java
@@ -32,6 +32,8 @@
private static final String CONTENT = "DecorView|LinearLayout|FrameLayout:id/content|";
private static final String DRAG_LAYER =
CONTENT + "LauncherRootView:id/launcher|DragLayer:id/drag_layer|";
+ private static final String RECENTS_DRAG_LAYER =
+ CONTENT + "LauncherRootView:id/launcher|RecentsDragLayer:id/drag_layer|";
// Paths of nodes that are excluded from analysis.
private static final Collection<String> PATHS_TO_IGNORE = Set.of(
@@ -112,17 +114,26 @@
DRAG_LAYER + "WidgetsFullSheet|SpringRelativeLayout:id/container",
DRAG_LAYER + "WidgetsTwoPaneSheet|SpringRelativeLayout:id/container",
CONTENT + "LauncherRootView:id/launcher|FloatingIconView",
- CONTENT
- + "LauncherRootView|RecentsDragLayer:id/drag_layer|FallbackRecentsView:id"
- + "/overview_panel",
- CONTENT
- + "LauncherRootView|RecentsDragLayer:id/drag_layer|NexusOverviewActionsView"
- + ":id/overview_actions_view|LinearLayout:id/action_buttons|Button:id"
- + "/action_screenshot",
- CONTENT
- + "LauncherRootView|RecentsDragLayer:id/drag_layer|NexusOverviewActionsView"
- + ":id/overview_actions_view|LinearLayout:id/action_buttons|Button:id"
- + "/action_select"
+ DRAG_LAYER + "FallbackRecentsView:id/overview_panel",
+ RECENTS_DRAG_LAYER + "FallbackRecentsView:id/overview_panel",
+ DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_screenshot",
+ RECENTS_DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_screenshot",
+ DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_select",
+ RECENTS_DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_select",
+ DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_split",
+ RECENTS_DRAG_LAYER
+ + "NexusOverviewActionsView:id/overview_actions_view"
+ + "|LinearLayout:id/action_buttons|ImageButton:id/action_split"
);
// Minimal increase or decrease of view's alpha between frames that triggers the error.
private static final float ALPHA_JUMP_THRESHOLD = 1f;