mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Folder support in Taskbar
- Add TaskbarActivityContext which allows shared Launcher elements to "just work" using existing generic ActivityContext. - TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>. - Inflate FolderIcon and Folder using TaskbarActivityContext to be shown in TaskbarContainerView. - Use TaskbarActivityContext's DeviceProfile to determine icon size instead of overriding in styles. This also ensures that normal BubbleTextView icons have the same size as FolderIcons. Test: Place a folder in home screen hotseat, ensure it shows up in taskbar and can be opened, and that apps inside it can be launched or dragged. Bug: 171917176 Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
This commit is contained in:
@@ -754,6 +754,9 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
}
|
||||
|
||||
public void clearLeaveBehindIfExists() {
|
||||
if (!(getLayoutParams() instanceof CellLayout.LayoutParams)) {
|
||||
return;
|
||||
}
|
||||
((CellLayout.LayoutParams) getLayoutParams()).canReorder = true;
|
||||
if (isInHotseat()) {
|
||||
CellLayout cl = (CellLayout) getParent().getParent();
|
||||
@@ -762,6 +765,9 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
}
|
||||
|
||||
public void drawLeaveBehindIfExists() {
|
||||
if (!(getLayoutParams() instanceof CellLayout.LayoutParams)) {
|
||||
return;
|
||||
}
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) getLayoutParams();
|
||||
// While the folder is open, the position of the icon cannot change.
|
||||
lp.canReorder = false;
|
||||
|
||||
Reference in New Issue
Block a user