diff options
Diffstat (limited to 'src/com/cyanogenmod/trebuchet/Hotseat.java')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Hotseat.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java index 9795c71a..9f6441a3 100644 --- a/src/com/cyanogenmod/trebuchet/Hotseat.java +++ b/src/com/cyanogenmod/trebuchet/Hotseat.java @@ -32,6 +32,8 @@ import java.util.Arrays; public class Hotseat extends PagedView { private int mCellCount; + private int mDefaultPage; + private boolean mTransposeLayoutWithOrientation; private boolean mIsLandscape; @@ -60,7 +62,7 @@ public class Hotseat extends PagedView { defaultPage = hotseatPages / 2; } - mCurrentPage = defaultPage; + mCurrentPage = mDefaultPage = defaultPage; TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Hotseat, defStyle, 0); @@ -247,6 +249,15 @@ public class Hotseat extends PagedView { } } + void moveToDefaultScreen(boolean animate) { + if (animate) { + snapToPage(mDefaultPage); + } else { + setCurrentPage(mDefaultPage); + } + getChildAt(mDefaultPage).requestFocus(); + } + @Override public void syncPages() { } |