use of com.android.launcher3.accessibility.AccessibleDragListenerAdapter in project android_packages_apps_Launcher3 by crdroidandroid.
the class Folder method startDrag.
public boolean startDrag(View v, DragOptions options) {
Object tag = v.getTag();
if (tag instanceof WorkspaceItemInfo) {
WorkspaceItemInfo item = (WorkspaceItemInfo) tag;
mEmptyCellRank = item.rank;
mCurrentDragView = v;
mDragController.addDragListener(this);
if (options.isAccessibleDrag) {
mDragController.addDragListener(new AccessibleDragListenerAdapter(mContent, FolderAccessibilityHelper::new) {
@Override
protected void enableAccessibleDrag(boolean enable) {
super.enableAccessibleDrag(enable);
mFooter.setImportantForAccessibility(enable ? IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS : IMPORTANT_FOR_ACCESSIBILITY_AUTO);
}
});
}
mLauncherDelegate.beginDragShared(v, this, options);
}
return true;
}
use of com.android.launcher3.accessibility.AccessibleDragListenerAdapter 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);
}
Aggregations