Adding menu to jump to shortcuts page in widgets tab
- Fixing bug in PagedView when setting the current page - Fixing small visual issue with flashing scroll indicator - Fixing slightly offset holographic icons Change-Id: Ic6ce6365daca41cb5a73706c7c4b078f33a4e39c
This commit is contained in:
1 parent
a22194bd9f
commit
5a808358f1
7 files changed
+100
-56
No files matched your search
@@ -291,6 +291,7 @@ public abstract class PagedView extends ViewGroup {
|
||||
|
||||
mCurrentPage = Math.max(0, Math.min(currentPage, getPageCount() - 1));
|
||||
updateCurrentPageScroll();
|
||||
updateScrollingIndicator();
|
||||
notifyPageSwitchListener();
|
||||
invalidate();
|
||||
}
|
||||
@@ -1618,6 +1619,9 @@ public abstract class PagedView extends ViewGroup {
|
||||
}
|
||||
|
||||
protected void invalidatePageData() {
|
||||
invalidatePageData(-1);
|
||||
}
|
||||
protected void invalidatePageData(int currentPage) {
|
||||
if (!mIsDataReady) {
|
||||
return;
|
||||
}
|
||||
@@ -1626,6 +1630,16 @@ public abstract class PagedView extends ViewGroup {
|
||||
// Update all the pages
|
||||
syncPages();
|
||||
|
||||
// We must force a measure after we've loaded the pages to update the content width and
|
||||
// to determine the full scroll width
|
||||
measure(MeasureSpec.makeMeasureSpec(getMeasuredWidth(), MeasureSpec.EXACTLY),
|
||||
MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.EXACTLY));
|
||||
|
||||
// Set a new page as the current page if necessary
|
||||
if (currentPage > -1) {
|
||||
setCurrentPage(currentPage);
|
||||
}
|
||||
|
||||
// Mark each of the pages as dirty
|
||||
final int count = getChildCount();
|
||||
mDirtyPageContent.clear();
|
||||
@@ -1659,14 +1673,16 @@ public abstract class PagedView extends ViewGroup {
|
||||
return !LauncherApplication.isScreenLarge();
|
||||
}
|
||||
|
||||
Runnable hideScrollingIndicatorRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hideScrollingIndicator(false);
|
||||
}
|
||||
};
|
||||
protected void flashScrollingIndicator() {
|
||||
removeCallbacks(hideScrollingIndicatorRunnable);
|
||||
showScrollingIndicator();
|
||||
postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hideScrollingIndicator(false);
|
||||
}
|
||||
}, sScrollIndicatorFlashDuration);
|
||||
postDelayed(hideScrollingIndicatorRunnable, sScrollIndicatorFlashDuration);
|
||||
}
|
||||
|
||||
protected void showScrollingIndicator() {
|
||||
|
||||
Reference in new issue
Block a user