diff options
Diffstat (limited to 'src/com/android/launcher2/PagedView.java')
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index 83b688d..4bcb4c7 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -270,6 +270,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc int getCurrentPage() { return mCurrentPage; } + int getNextPage() { + return (mNextPage != INVALID_PAGE) ? mNextPage : mCurrentPage; + } int getPageCount() { return getChildCount(); @@ -1858,9 +1861,8 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc } protected String getCurrentPageDescription() { - int page = (mNextPage != INVALID_PAGE) ? mNextPage : mCurrentPage; return String.format(getContext().getString(R.string.default_scroll_format), - page + 1, getChildCount()); + getNextPage() + 1, getChildCount()); } @Override |