feat : Initial implementation Caddy (#5166)
- Introduced "Caddy" functionality to organize apps within the app drawer. - Allows grouping of applications for better accessibility and user experience. - Serves as a foundational feature for enhancing app drawer usability.
This commit is contained in:
@@ -403,6 +403,8 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
if (dragObject.dragSource != this) {
|
||||
return;
|
||||
}
|
||||
if (isInAppDrawer()) close(true);
|
||||
|
||||
mContent.removeItem(mCurrentDragView);
|
||||
mItemsInvalidated = true;
|
||||
|
||||
@@ -415,6 +417,10 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
mItemAddedBackToSelfViaIcon = false;
|
||||
}
|
||||
|
||||
public boolean isInAppDrawer() {
|
||||
return mInfo.container == ItemInfo.NO_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDragEnd() {
|
||||
if (mIsExternalDrag && mIsDragInProgress) {
|
||||
@@ -583,7 +589,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
}
|
||||
// In case any children didn't come across during loading, clean up the folder accordingly
|
||||
mFolderIcon.post(() -> {
|
||||
if (getItemCount() <= 1) {
|
||||
if (getItemCount() <= 1 && !isInAppDrawer()) {
|
||||
replaceFolderWithFinalItem();
|
||||
}
|
||||
});
|
||||
@@ -971,7 +977,7 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
|
||||
mRearrangeOnClose = false;
|
||||
}
|
||||
if (getItemCount() <= 1) {
|
||||
if (!mIsDragInProgress && !mSuppressFolderDeletion) {
|
||||
if (!mIsDragInProgress && !mSuppressFolderDeletion && !isInAppDrawer()) {
|
||||
replaceFolderWithFinalItem();
|
||||
} else if (mIsDragInProgress) {
|
||||
mDeleteFolderOnDropCompleted = true;
|
||||
|
||||
Reference in New Issue
Block a user