Lines Matching defs:page
76 page = p;
96 int page;
112 page = p;
125 // All the widget previews are loaded, so we can just callback to inflate the page
136 // The page that this async task is associated with
138 int page;
143 * The Apps/Customize page that displays all the applications, widgets, and shortcuts.
296 /** Returns the item index of the center item on this page so that we can restore to this
326 /** Get the index of the item to restore to if we need to restore the current page. */
334 /** Returns the page in the current orientation which is expected to contain the specified
348 /** Restores the page for an item at the specified index */
366 // use for each page
385 // Restore the page
386 int page = getPageForComponent(mSaveInstanceStateItemIndex);
387 invalidatePageData(Math.max(0, page), hostIsTransitioning);
925 mDirtyPageContent.set(task.page, true);
928 View v = getPageAt(task.page);
938 int page = getCurrentPage();
940 page = 0;
943 invalidatePageData(page, true);
957 int pageIndex = task.page;
981 // expected page width, so we can actually optimize by hiding all the TextView-based
991 public void syncAppsPageItems(int page, boolean immediate) {
995 int startIndex = page * numCells;
997 AppsCustomizeCellLayout layout = (AppsCustomizeCellLayout) getPageAt(page);
1028 * A helper to return the priority for loading of the specified widget page.
1030 private int getWidgetPageLoadPriority(int page) {
1031 // If we are snapping to another page, use that index as the target page index
1037 // We use the distance from the target page as an initial guess of priority, but if there
1038 // are no pages of higher priority than the page specified, then bump up the priority of
1039 // the specified page.
1044 minPageDiff = Math.abs(task.page - toPage);
1047 int rawPageDiff = Math.abs(page - toPage);
1051 * Return the appropriate thread priority for loading for a given page (we give the current
1052 * page much higher priority)
1054 private int getThreadPriorityForPage(int page) {
1056 int pageDiff = getWidgetPageLoadPriority(page);
1065 private int getSleepForPage(int page) {
1066 int pageDiff = getWidgetPageLoadPriority(page);
1070 * Creates and executes a new AsyncTask to load a page of widget previews.
1072 private void prepareLoadWidgetPreviewsTask(int page, ArrayList<Object> widgets,
1079 int taskPage = task.page;
1090 final int sleepMs = getSleepForPage(page);
1091 AsyncTaskPageData pageData = new AsyncTaskPageData(page, widgets, cellWidth, cellHeight,
1118 AppsCustomizeAsyncTask t = new AppsCustomizeAsyncTask(page,
1120 t.setThreadPriority(getThreadPriorityForPage(page));
1137 public void syncWidgetPageItems(final int page, final boolean immediate) {
1150 int offset = page * numItemsPerPage;
1156 final PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
1226 AsyncTaskPageData data = new AsyncTaskPageData(page, items,
1234 prepareLoadWidgetPreviewsTask(page, items,
1274 int page = data.page;
1275 PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
1293 int pageIndex = task.page;
1332 public void syncPageItems(int page, boolean immediate) {
1334 syncWidgetPageItems(page, immediate);
1336 syncAppsPageItems(page, immediate);
1340 // We want our pages to be z-ordered such that the further a page is to the left, the higher
1383 // On large screens we need to fade the page as it nears its leftmost position
1402 // On the first page, we don't want the page to have any lateral motion
1410 // On the last page, we don't want the page to have any lateral motion.
1508 * appropriately determine when to invalidate the PagedView page data. In cases where the data
1515 // request a layout to trigger the page data when ready.
1657 * We load an extra page on each side to prevent flashes from scrolling and loading of the
1662 protected int getAssociatedLowerPageBound(int page) {
1665 int windowMinIndex = Math.max(Math.min(page - sLookBehindPageCount, count - windowSize), 0);
1668 protected int getAssociatedUpperPageBound(int page) {
1671 int windowMaxIndex = Math.min(Math.max(page + sLookAheadPageCount, windowSize - 1),
1677 int page = (mNextPage != INVALID_PAGE) ? mNextPage : mCurrentPage;
1691 return String.format(getContext().getString(stringId), page + 1, count);