Lines Matching refs:page
75 page = p;
95 int page;
111 page = p;
124 // All the widget previews are loaded, so we can just callback to inflate the page
135 // The page that this async task is associated with
137 int page;
142 * The Apps/Customize page that displays all the applications, widgets, and shortcuts.
275 /** Returns the item index of the center item on this page so that we can restore to this
305 /** Get the index of the item to restore to if we need to restore the current page. */
313 /** Returns the page in the current orientation which is expected to contain the specified
327 /** Restores the page for an item at the specified index */
341 // use for each page
356 int page = getPageForComponent(mSaveInstanceStateItemIndex);
357 invalidatePageData(Math.max(0, page), hostIsTransitioning);
864 mDirtyPageContent.set(task.page, true);
867 View v = getPageAt(task.page);
879 int page = (mContentType != type) ? 0 : getCurrentPage();
881 invalidatePageData(page, true);
896 int pageIndex = task.page;
920 // expected page width, so we can actually optimize by hiding all the TextView-based
947 public void syncAppsPageItems(int page, boolean immediate) {
951 int startIndex = page * numCells;
953 AppsCustomizeCellLayout layout = (AppsCustomizeCellLayout) getPageAt(page);
985 * A helper to return the priority for loading of the specified widget page.
987 private int getWidgetPageLoadPriority(int page) {
988 // If we are snapping to another page, use that index as the target page index
994 // We use the distance from the target page as an initial guess of priority, but if there
995 // are no pages of higher priority than the page specified, then bump up the priority of
996 // the specified page.
1001 minPageDiff = Math.abs(task.page - toPage);
1004 int rawPageDiff = Math.abs(page - toPage);
1008 * Return the appropriate thread priority for loading for a given page (we give the current
1009 * page much higher priority)
1011 private int getThreadPriorityForPage(int page) {
1013 int pageDiff = getWidgetPageLoadPriority(page);
1022 private int getSleepForPage(int page) {
1023 int pageDiff = getWidgetPageLoadPriority(page);
1027 * Creates and executes a new AsyncTask to load a page of widget previews.
1029 private void prepareLoadWidgetPreviewsTask(int page, ArrayList<Object> widgets,
1036 int taskPage = task.page;
1047 final int sleepMs = getSleepForPage(page);
1048 AsyncTaskPageData pageData = new AsyncTaskPageData(page, widgets, cellWidth, cellHeight,
1075 AppsCustomizeAsyncTask t = new AppsCustomizeAsyncTask(page,
1077 t.setThreadPriority(getThreadPriorityForPage(page));
1099 public void syncWidgetPageItems(final int page, final boolean immediate) {
1102 final PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
1113 int offset = page * numItemsPerPage;
1196 AsyncTaskPageData data = new AsyncTaskPageData(page, items,
1204 prepareLoadWidgetPreviewsTask(page, items,
1244 int page = data.page;
1245 PagedViewGridLayout layout = (PagedViewGridLayout) getPageAt(page);
1263 int pageIndex = task.page;
1302 public void syncPageItems(int page, boolean immediate) {
1304 syncWidgetPageItems(page, immediate);
1306 syncAppsPageItems(page, immediate);
1310 // We want our pages to be z-ordered such that the further a page is to the left, the higher
1399 * appropriately determine when to invalidate the PagedView page data. In cases where the data
1406 // request a layout to trigger the page data when ready.
1528 * We load an extra page on each side to prevent flashes from scrolling and loading of the
1533 protected int getAssociatedLowerPageBound(int page) {
1536 int windowMinIndex = Math.max(Math.min(page - sLookBehindPageCount, count - windowSize), 0);
1539 protected int getAssociatedUpperPageBound(int page) {
1542 int windowMaxIndex = Math.min(Math.max(page + sLookAheadPageCount, windowSize - 1),
1548 int page = (mNextPage != INVALID_PAGE) ? mNextPage : mCurrentPage;
1562 return String.format(getContext().getString(stringId), page + 1, count);