Pushing folders up to DragLayer

-> Increasing max num of items in Folders to match the grid
   size of the workspace.
-> Had to push folders up to prevent clipping

Change-Id: I7aae7920cff940b8e88e9bef82162c6ab5ff11e9
This commit is contained in:
Adam Cohen
2011-06-28 18:10:06 -07:00
parent 3c99e77ff8
commit 8e776a62c5
4 changed files with 36 additions and 57 deletions
+3 -23
View File
@@ -415,10 +415,10 @@ public class Workspace extends SmoothPagedView
* @return The open folder on the current screen, or null if there is none
*/
Folder getOpenFolder() {
ViewGroup currentPage = ((CellLayout) getChildAt(mCurrentPage)).getChildrenLayout();
int count = currentPage.getChildCount();
DragLayer dragLayer = (DragLayer) mLauncher.findViewById(R.id.drag_layer);
int count = dragLayer.getChildCount();
for (int i = 0; i < count; i++) {
View child = currentPage.getChildAt(i);
View child = dragLayer.getChildAt(i);
if (child instanceof Folder) {
Folder folder = (Folder) child;
if (folder.getInfo().opened)
@@ -428,26 +428,6 @@ public class Workspace extends SmoothPagedView
return null;
}
ArrayList<Folder> getOpenFolders() {
final int screenCount = getChildCount();
ArrayList<Folder> folders = new ArrayList<Folder>(screenCount);
for (int screen = 0; screen < screenCount; screen++) {
ViewGroup currentPage = ((CellLayout) getChildAt(screen)).getChildrenLayout();
int count = currentPage.getChildCount();
for (int i = 0; i < count; i++) {
View child = currentPage.getChildAt(i);
if (child instanceof Folder) {
Folder folder = (Folder) child;
if (folder.getInfo().opened)
folders.add(folder);
break;
}
}
}
return folders;
}
boolean isTouchActive() {
return mTouchState != TOUCH_STATE_REST;
}