Post by AnkuLua on Oct 4, 2015 15:43:42 GMT
New User Interface
From version 2.0.0, AnkuLua uses action bar instead of buttons.
The view becomes
Start/stop service, select script, settings and user guide are all move to top of the App.
Let's look at the new friend, settings.
Now the user can choose to
- stop when volume down
- hide stop button
Note: this could only be activated when "stop when volume down" activated
-play when volume up
Note: why is there no "hide start button"? Just feel it's very possible to cause user confusion.
These features are pro version only.
New Methods
zoom(pt1StartX, pt1StartY, pt1EndX, pt1EndY, pt2StartX, pt2StartY, pt2EndX, pt2EndY, step)
It means one finger moving from (pt1StartX, pt1StartY) to (pt1EndX, pt1EndY) while the other from (pt2StartX, pt2StartY) to (pt2EndX, pt2EndY) in specified steps.
For example, the following code will zoom out the screen
doubleClick(PSMRL)
The method name says everything. It could be called directly or from Region object.
longClick(PSMRL, seconds)
Long click on PSMRL for the specified amount of time.
playMusic(file, loop)
Play the file for single (loop = false) or in loop (loop = true). This method is in pro version only.
stopMusic()
Stop the music played. This method is in pro version only.
vibrate(seconds)
Vibrate the device for the specified amount of time. This method is in pro version only.
isVolumeUp() and isVolumeDown()
Check if the volume changed (including music and ring volume). This method is in pro version only.
Note: For some devices, the first press of volume keys just show the current volume and no volume is changed. Therefore, you need to press it again to take effect.
Note: setVolumeDetect(boolean) is added in version 2.1.0
From version 2.0.0, AnkuLua uses action bar instead of buttons.
The view becomes
Start/stop service, select script, settings and user guide are all move to top of the App.
Let's look at the new friend, settings.
Now the user can choose to
- stop when volume down
- hide stop button
Note: this could only be activated when "stop when volume down" activated
-play when volume up
Note: why is there no "hide start button"? Just feel it's very possible to cause user confusion.
These features are pro version only.
New Methods
zoom(pt1StartX, pt1StartY, pt1EndX, pt1EndY, pt2StartX, pt2StartY, pt2EndX, pt2EndY, step)
It means one finger moving from (pt1StartX, pt1StartY) to (pt1EndX, pt1EndY) while the other from (pt2StartX, pt2StartY) to (pt2EndX, pt2EndY) in specified steps.
For example, the following code will zoom out the screen
-- ========== Settings ================
Settings:setCompareDimension(true, 1280)
Settings:setScriptDimension(true, 1280)
-- ========== main program ===========
zoom(50, 350, 330, 350, 1200, 350, 350, 350, 300)
doubleClick(PSMRL)
The method name says everything. It could be called directly or from Region object.
longClick(PSMRL, seconds)
Long click on PSMRL for the specified amount of time.
playMusic(file, loop)
Play the file for single (loop = false) or in loop (loop = true). This method is in pro version only.
stopMusic()
Stop the music played. This method is in pro version only.
vibrate(seconds)
Vibrate the device for the specified amount of time. This method is in pro version only.
isVolumeUp() and isVolumeDown()
Check if the volume changed (including music and ring volume). This method is in pro version only.
Note: For some devices, the first press of volume keys just show the current volume and no volume is changed. Therefore, you need to press it again to take effect.
setVolumeDetect(true)
while (true) do
if (isVolumeUp()) then toast("Volume up") end
if (isVolumeDown()) then toast("Volume down") end
end
Note: setVolumeDetect(boolean) is added in version 2.1.0