Search in sources :

Example 1 with WorkspaceAccessibilityHelper

use of com.android.launcher3.accessibility.WorkspaceAccessibilityHelper in project android_packages_apps_Launcher3 by crdroidandroid.

the class Workspace method startDrag.

public void startDrag(CellLayout.CellInfo cellInfo, DragOptions options) {
    View child = cellInfo.cell;
    mDragInfo = cellInfo;
    child.setVisibility(INVISIBLE);
    if (options.isAccessibleDrag) {
        mDragController.addDragListener(new AccessibleDragListenerAdapter(this, WorkspaceAccessibilityHelper::new) {

            @Override
            protected void enableAccessibleDrag(boolean enable) {
                super.enableAccessibleDrag(enable);
                setEnableForLayout(mLauncher.getHotseat(), enable);
            }
        });
    }
    beginDragShared(child, this, options);
}
Also used : AccessibleDragListenerAdapter(com.android.launcher3.accessibility.AccessibleDragListenerAdapter) DraggableView(com.android.launcher3.dragndrop.DraggableView) LauncherAppWidgetHostView(com.android.launcher3.widget.LauncherAppWidgetHostView) AppWidgetHostView(android.appwidget.AppWidgetHostView) View(android.view.View) PendingAppWidgetHostView(com.android.launcher3.widget.PendingAppWidgetHostView) DragView(com.android.launcher3.dragndrop.DragView)

Aggregations

AppWidgetHostView (android.appwidget.AppWidgetHostView)1 View (android.view.View)1 AccessibleDragListenerAdapter (com.android.launcher3.accessibility.AccessibleDragListenerAdapter)1 DragView (com.android.launcher3.dragndrop.DragView)1 DraggableView (com.android.launcher3.dragndrop.DraggableView)1 LauncherAppWidgetHostView (com.android.launcher3.widget.LauncherAppWidgetHostView)1 PendingAppWidgetHostView (com.android.launcher3.widget.PendingAppWidgetHostView)1