Home | History | Annotate | Download | only in launcher2

Lines Matching defs:page

92         page = p;
102 page = p;
129 int page;
144 page = p;
157 // All the widget previews are loaded, so we can just callback to inflate the page
168 // The page that this async task is associated with
170 int page;
233 * The Apps/Customize page that displays all the applications, widgets, and shortcuts.
384 /** Returns the item index of the center item on this page so that we can restore to this
412 /** Get the index of the item to restore to if we need to restore the current page. */
420 /** Returns the page in the current orientation which is expected to contain the specified
434 /** Restores the page for an item at the specified index */
466 // use for each page
484 // Restore the page
485 int page = getPageForComponent(mSaveInstanceStateItemIndex);
486 invalidatePageData(Math.max(0, page), hostIsTransitioning);
976 mDirtyPageContent.set(task.page, true);
979 View v = getPageAt(task.page);
1004 int pageIndex = task.page;
1047 // expected page width, so we can actually optimize by hiding all the TextView-based
1057 public void syncAppsPageItems(int page, boolean immediate) {
1060 int startIndex = page * numCells;
1062 PagedViewCellLayout layout = (PagedViewCellLayout) getPageAt(page);
1090 * A helper to return the priority for loading of the specified widget page.
1092 private int getWidgetPageLoadPriority(int page) {
1093 // If we are snapping to another page, use that index as the target page index
1099 // We use the distance from the target page as an initial guess of priority, but if there
1100 // are no pages of higher priority than the page specified, then bump up the priority of
1101 // the specified page.
1106 minPageDiff = Math.abs(task.page - toPage);
1109 int rawPageDiff = Math.abs(page - toPage);
1113 * Return the appropriate thread priority for loading for a given page (we give the current
1114 * page much higher priority)
1116 private int getThreadPriorityForPage(int page) {
1118 int pageDiff = getWidgetPageLoadPriority(page);
1127 private int getSleepForPage(int page) {
1128 int pageDiff = getWidgetPageLoadPriority(page);
1132 * Creates and executes a new AsyncTask to load a page of widget previews.
1134 private void prepareLoadWidgetPreviewsTask(int page, ArrayList<Object> widgets,
1141 int taskPage = task.page;
1152 final int sleepMs = getSleepForPage(page);
1153 AsyncTaskPageData pageData = new AsyncTaskPageData(page, widgets, cellWidth, cellHeight,
1180 AppsCustomizeAsyncTask t = new AppsCustomizeAsyncTask(page,
1182 t.setThreadPriority(getThreadPriorityForPage(page));
1379 public void syncWidgetPageItems(final int page, final boolean immediate) {
1392 int offset = (page - mNumAppsPages) * numItemsPerPage;
1398 final PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
1465 AsyncTaskPageData data = new AsyncTaskPageData(page, items,
1473 prepareLoadWidgetPreviewsTask(page, items,
1528 int page = data.page;
1529 PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
1548 int pageIndex = task.page;
1578 public void syncPageItems(int page, boolean immediate) {
1579 if (page < mNumAppsPages) {
1580 syncAppsPageItems(page, immediate);
1582 syncWidgetPageItems(page, immediate);
1586 // We want our pages to be z-ordered such that the further a page is to the left, the higher
1619 // On large screens we need to fade the page as it nears its leftmost position
1634 // On the first page, we don't want the page to have any lateral motion
1642 // On the last page, we don't want the page to have any lateral motion.
1711 * appropriately determine when to invalidate the PagedView page data. In cases where the data
1718 // request a layout to trigger the page data when ready.
1863 * We load an extra page on each side to prevent flashes from scrolling and loading of the
1868 protected int getAssociatedLowerPageBound(int page) {
1871 int windowMinIndex = Math.max(Math.min(page - sLookBehindPageCount, count - windowSize), 0);
1874 protected int getAssociatedUpperPageBound(int page) {
1877 int windowMaxIndex = Math.min(Math.max(page + sLookAheadPageCount, windowSize - 1),
1884 int page = (mNextPage != INVALID_PAGE) ? mNextPage : mCurrentPage;
1888 if (page < mNumAppsPages) {
1892 page -= mNumAppsPages;
1897 return String.format(getContext().getString(stringId), page + 1, count);