Loading res/layout/keyboard_drag_and_drop.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 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. --> <com.android.launcher3.keyboard.KeyboardDragAndDropView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" android:orientation="vertical" android:elevation="6dp"> <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:background="?attr/folderFillColor" android:padding="8dp" android:textColor="?attr/folderTextColor" /> </com.android.launcher3.keyboard.KeyboardDragAndDropView> No newline at end of file res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ <dimen name="drag_flingToDeleteMinVelocity">-1500dp</dimen> <dimen name="spring_loaded_panel_border">1dp</dimen> <dimen name="keyboard_drag_stroke_width">4dp</dimen> <!-- Folders --> <dimen name="page_indicator_dot_size">8dp</dimen> Loading src/com/android/launcher3/AbstractFloatingView.java +6 −5 Original line number Diff line number Diff line Loading @@ -76,17 +76,18 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch public static final int TYPE_SNACKBAR = 1 << 7; public static final int TYPE_LISTENER = 1 << 8; public static final int TYPE_ALL_APPS_EDU = 1 << 9; public static final int TYPE_DRAG_DROP_POPUP = 1 << 10; // Popups related to quickstep UI public static final int TYPE_TASK_MENU = 1 << 10; public static final int TYPE_OPTIONS_POPUP = 1 << 11; public static final int TYPE_ICON_SURFACE = 1 << 12; public static final int TYPE_TASK_MENU = 1 << 11; public static final int TYPE_OPTIONS_POPUP = 1 << 12; public static final int TYPE_ICON_SURFACE = 1 << 13; public static final int TYPE_ALL = TYPE_FOLDER | TYPE_ACTION_POPUP | TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET | TYPE_ON_BOARD_POPUP | TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU | TYPE_OPTIONS_POPUP | TYPE_SNACKBAR | TYPE_LISTENER | TYPE_ALL_APPS_EDU | TYPE_ICON_SURFACE; | TYPE_ICON_SURFACE | TYPE_DRAG_DROP_POPUP; // Type of popups which should be kept open during launcher rebind public static final int TYPE_REBIND_SAFE = TYPE_WIDGETS_FULL_SHEET Loading @@ -103,7 +104,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch // These view all have particular operation associated with swipe down interaction. public static final int TYPE_STATUS_BAR_SWIPE_DOWN_DISALLOW = TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGETS_FULL_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_ON_BOARD_POPUP | TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU ; TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU | TYPE_DRAG_DROP_POPUP; protected boolean mIsOpen; Loading src/com/android/launcher3/ButtonDropTarget.java +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ public abstract class ButtonDropTarget extends TextView @Override public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) { mActive = supportsDrop(dragObject.dragInfo); mActive = !options.isKeyboardDrag && supportsDrop(dragObject.dragInfo); mDrawable.setColorFilter(null); if (mCurrentColorAnim != null) { mCurrentColorAnim.cancel(); Loading src/com/android/launcher3/CellLayout.java +7 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,13 @@ public class CellLayout extends ViewGroup { } } /** * Returns the currently set accessibility delegate */ public DragAndDropAccessibilityDelegate getDragAndDropAccessibilityDelegate() { return mTouchHelper; } @Override public boolean dispatchHoverEvent(MotionEvent event) { // Always attempt to dispatch hover events to accessibility first. Loading Loading
res/layout/keyboard_drag_and_drop.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2021 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. --> <com.android.launcher3.keyboard.KeyboardDragAndDropView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" android:orientation="vertical" android:elevation="6dp"> <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:background="?attr/folderFillColor" android:padding="8dp" android:textColor="?attr/folderTextColor" /> </com.android.launcher3.keyboard.KeyboardDragAndDropView> No newline at end of file
res/values/dimens.xml +1 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ <dimen name="drag_flingToDeleteMinVelocity">-1500dp</dimen> <dimen name="spring_loaded_panel_border">1dp</dimen> <dimen name="keyboard_drag_stroke_width">4dp</dimen> <!-- Folders --> <dimen name="page_indicator_dot_size">8dp</dimen> Loading
src/com/android/launcher3/AbstractFloatingView.java +6 −5 Original line number Diff line number Diff line Loading @@ -76,17 +76,18 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch public static final int TYPE_SNACKBAR = 1 << 7; public static final int TYPE_LISTENER = 1 << 8; public static final int TYPE_ALL_APPS_EDU = 1 << 9; public static final int TYPE_DRAG_DROP_POPUP = 1 << 10; // Popups related to quickstep UI public static final int TYPE_TASK_MENU = 1 << 10; public static final int TYPE_OPTIONS_POPUP = 1 << 11; public static final int TYPE_ICON_SURFACE = 1 << 12; public static final int TYPE_TASK_MENU = 1 << 11; public static final int TYPE_OPTIONS_POPUP = 1 << 12; public static final int TYPE_ICON_SURFACE = 1 << 13; public static final int TYPE_ALL = TYPE_FOLDER | TYPE_ACTION_POPUP | TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_WIDGETS_FULL_SHEET | TYPE_ON_BOARD_POPUP | TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU | TYPE_OPTIONS_POPUP | TYPE_SNACKBAR | TYPE_LISTENER | TYPE_ALL_APPS_EDU | TYPE_ICON_SURFACE; | TYPE_ICON_SURFACE | TYPE_DRAG_DROP_POPUP; // Type of popups which should be kept open during launcher rebind public static final int TYPE_REBIND_SAFE = TYPE_WIDGETS_FULL_SHEET Loading @@ -103,7 +104,7 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch // These view all have particular operation associated with swipe down interaction. public static final int TYPE_STATUS_BAR_SWIPE_DOWN_DISALLOW = TYPE_WIDGETS_BOTTOM_SHEET | TYPE_WIDGETS_FULL_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_ON_BOARD_POPUP | TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU ; TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU | TYPE_DRAG_DROP_POPUP; protected boolean mIsOpen; Loading
src/com/android/launcher3/ButtonDropTarget.java +1 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ public abstract class ButtonDropTarget extends TextView @Override public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) { mActive = supportsDrop(dragObject.dragInfo); mActive = !options.isKeyboardDrag && supportsDrop(dragObject.dragInfo); mDrawable.setColorFilter(null); if (mCurrentColorAnim != null) { mCurrentColorAnim.cancel(); Loading
src/com/android/launcher3/CellLayout.java +7 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,13 @@ public class CellLayout extends ViewGroup { } } /** * Returns the currently set accessibility delegate */ public DragAndDropAccessibilityDelegate getDragAndDropAccessibilityDelegate() { return mTouchHelper; } @Override public boolean dispatchHoverEvent(MotionEvent event) { // Always attempt to dispatch hover events to accessibility first. Loading