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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user