mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Add support for MoveTo.
This commit is contained in:
@@ -482,9 +482,11 @@ public class AllAppsView extends RSSurfaceView
|
||||
private Resources mRes;
|
||||
private Script mScript;
|
||||
private Script.Invokable mInvokeMove;
|
||||
private Script.Invokable mInvokeMoveTo;
|
||||
private Script.Invokable mInvokeFling;
|
||||
private Script.Invokable mInvokeResetWAR;
|
||||
|
||||
|
||||
private ProgramStore mPSIcons;
|
||||
private ProgramStore mPSText;
|
||||
private ProgramFragment mPFColor;
|
||||
@@ -570,6 +572,7 @@ public class AllAppsView extends RSSurfaceView
|
||||
public int selectedIconTexture;
|
||||
public float zoomTarget;
|
||||
public int homeButtonId;
|
||||
public float targetPos;
|
||||
|
||||
State() {
|
||||
mType = Type.createFromClass(mRS, State.class, 1, "StateClass");
|
||||
@@ -743,6 +746,7 @@ public class AllAppsView extends RSSurfaceView
|
||||
sb.setType(mState.mType, "state", Defines.ALLOC_STATE);
|
||||
mInvokeMove = sb.addInvokable("move");
|
||||
mInvokeFling = sb.addInvokable("fling");
|
||||
mInvokeMoveTo = sb.addInvokable("moveTo");
|
||||
mInvokeResetWAR = sb.addInvokable("resetHWWar");
|
||||
mScript = sb.create();
|
||||
mScript.setClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
@@ -937,6 +941,12 @@ public class AllAppsView extends RSSurfaceView
|
||||
mInvokeMove.execute();
|
||||
}
|
||||
|
||||
void moveTo(float row) {
|
||||
mState.targetPos = row;
|
||||
mState.save();
|
||||
mInvokeMoveTo.execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* You need to call save() on mState on your own after calling this.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user