Fixing various small bugs with launcher

- Items added from customization tray add from top left now
- Fixing issue where wallpaper tab was not showing
- Workaround for the extra pixel line showing in homescreen drag icons
- Speeding up animations for tab transitions and clicking

Change-Id: I865531bb4cf896320a9e2ff6cef08bed221a2294
This commit is contained in:
Winson Chung committed 2010-11-11 17:20:48 -08:00
1 parent 580e277481
commit bbc60d8e79
8 files changed
+35 -18

No files matched your search

+12 -3
View File
@@ -244,6 +244,17 @@ public abstract class PagedView extends ViewGroup {
return getWidth();
}
/**
* Updates the scroll of the current page immediately to its final scroll position. We use this
* in CustomizePagedView to allow tabs to share the same PagedView while resetting the scroll of
* the previous tab page.
*/
protected void updateCurrentPageScroll() {
int newX = getChildOffset(mCurrentPage) - getRelativeChildOffset(mCurrentPage);
scrollTo(newX, 0);
mScroller.setFinalX(newX);
}
/**
* Sets the current page.
*/
@@ -256,9 +267,7 @@ public abstract class PagedView extends ViewGroup {
}
mCurrentPage = Math.max(0, Math.min(currentPage, getPageCount() - 1));
int newX = getChildOffset(mCurrentPage) - getRelativeChildOffset(mCurrentPage);
scrollTo(newX, 0);
mScroller.setFinalX(newX);
updateCurrentPageScroll();
invalidate();
notifyPageSwitchListener();