Merge "Focus doesn\'t leave folders without also closing them." into ub-launcher3-burnaby-polish
am: 298f1c4578
* commit '298f1c4578e45168e74aa4b8561fcd88bfe509fe':
Focus doesn't leave folders without also closing them.
This commit is contained in:
@@ -397,16 +397,28 @@ public class FolderPagedView extends PagedView {
|
||||
return !ALLOW_FOLDER_SCROLL && getItemCount() >= mMaxItemsPerPage;
|
||||
}
|
||||
|
||||
public View getFirstItem() {
|
||||
if (getChildCount() < 1) {
|
||||
return null;
|
||||
}
|
||||
ShortcutAndWidgetContainer currContainer = getCurrentCellLayout().getShortcutsAndWidgets();
|
||||
if (mGridCountX > 0) {
|
||||
return currContainer.getChildAt(0, 0);
|
||||
} else {
|
||||
return currContainer.getChildAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
public View getLastItem() {
|
||||
if (getChildCount() < 1) {
|
||||
return null;
|
||||
}
|
||||
ShortcutAndWidgetContainer lastContainer = getCurrentCellLayout().getShortcutsAndWidgets();
|
||||
int lastRank = lastContainer.getChildCount() - 1;
|
||||
ShortcutAndWidgetContainer currContainer = getCurrentCellLayout().getShortcutsAndWidgets();
|
||||
int lastRank = currContainer.getChildCount() - 1;
|
||||
if (mGridCountX > 0) {
|
||||
return lastContainer.getChildAt(lastRank % mGridCountX, lastRank / mGridCountX);
|
||||
return currContainer.getChildAt(lastRank % mGridCountX, lastRank / mGridCountX);
|
||||
} else {
|
||||
return lastContainer.getChildAt(lastRank);
|
||||
return currContainer.getChildAt(lastRank);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user