Workspace no longer scrolls during drag when shrunk

Change-Id: If71ba7638259f4015c5c088797f2b2719066cf2e
This commit is contained in:
Michael Jurka
2010-08-23 11:33:38 -07:00
parent 241c3b451d
commit 7f0f4f3c35

View File

@@ -1731,22 +1731,26 @@ public class Workspace extends ViewGroup
}
public void scrollLeft() {
if (mScroller.isFinished()) {
if (mCurrentScreen > 0)
snapToScreen(mCurrentScreen - 1);
} else {
if (mNextScreen > 0)
snapToScreen(mNextScreen - 1);
if (!mIsSmall) {
if (mScroller.isFinished()) {
if (mCurrentScreen > 0)
snapToScreen(mCurrentScreen - 1);
} else {
if (mNextScreen > 0)
snapToScreen(mNextScreen - 1);
}
}
}
public void scrollRight() {
if (mScroller.isFinished()) {
if (mCurrentScreen < getChildCount() - 1)
snapToScreen(mCurrentScreen + 1);
} else {
if (mNextScreen < getChildCount() - 1)
snapToScreen(mNextScreen + 1);
if (!mIsSmall) {
if (mScroller.isFinished()) {
if (mCurrentScreen < getChildCount() - 1)
snapToScreen(mCurrentScreen + 1);
} else {
if (mNextScreen < getChildCount() - 1)
snapToScreen(mNextScreen + 1);
}
}
}