mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Adding support for drag and drop of folders and shortcuts.
also:
- Long press on empty space on workspace now brings up customization tray
- Fixed: while dragging, items appeared to be dropping on folders two cells to the right
- Fixed: Disabling drops on folders when the workspace is shrunken
- Fixed: account for scaling of dragged items when checking if they overlap
with shrunken workspace screens
- Making folder icons dimmable to match shortcuts and widgets
- When deciding with shrunken workspace screen we're dragging to, we now use the closest screen rather than the one that has been overlapped the most
- Refactored drag/add mechanism, removing array of occupied cells from CellInfo
- Removed dead code/variables
This commit is contained in:
@@ -29,7 +29,7 @@ import com.android.launcher.R;
|
||||
/**
|
||||
* An icon that can appear on in the workspace representing an {@link UserFolder}.
|
||||
*/
|
||||
public class FolderIcon extends BubbleTextView implements DropTarget {
|
||||
public class FolderIcon extends DimmableBubbleTextView implements DropTarget {
|
||||
private UserFolderInfo mInfo;
|
||||
private Launcher mLauncher;
|
||||
private Drawable mCloseIcon;
|
||||
@@ -43,6 +43,10 @@ public class FolderIcon extends BubbleTextView implements DropTarget {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public boolean isDropEnabled() {
|
||||
return !((Workspace)getParent().getParent()).isSmall();
|
||||
}
|
||||
|
||||
static FolderIcon fromXml(int resId, Launcher launcher, ViewGroup group,
|
||||
UserFolderInfo folderInfo) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user