Class Overview
A specialized ActivityScreen used for the main home screen.
Summary
Public Methods |
Desktop
|
getDesktopByName(String name)
Returns a desktop by its name, as set in the "Configure desktop" screen.
|
void
|
goToDesktop(int id)
Go to a specified desktop, without changing the current position in this desktop.
|
void
|
goToDesktopPosition(int id, float x, float y, float scale, boolean animate)
Go to a specified desktop and set the current absolute position in this desktop.
|
void
|
goToDesktopPosition(int id, float x, float y)
Go to a specified desktop and set the current absolute position in this desktop, setting a scale of 1 and using animations.
|
[Expand]
Inherited Methods |
From class
net.pierrox.lightning_launcher.script.api.screen.ActivityScreen
ImageBitmap
|
cropImage(ImageBitmap image, boolean full_size)
Request the user to select an area in the image.
|
void
|
hideActionBar()
Hide the android action bar.
|
int
|
pickColor(String title, int color, boolean hasAlpha)
Request the user to pick a color.
|
Image
|
pickImage(int maxPixels)
Request the user to pick an image through the Lightning image picker screen.
|
float
|
pickNumericValue(String title, float value, String valueType, float min, float max, float interval, String unit)
Request the user to enter a numeric value.
|
void
|
showActionBar(Function onCreateOptionsMenu, Function onOptionsItemSelected)
Display the Android action bar.
|
boolean
|
startActivityForResult(Intent intent, Script receiver, String token)
Start an activity and handle the result in another script.
|
|
From class
net.pierrox.lightning_launcher.script.api.screen.Screen
Container[]
|
getAllContainersById(int id)
Returns all containers for a given id.
|
Item[]
|
getAllItemsById(int id)
Returns all items for a given id.
|
Container
|
getContainerById(int id)
Returns the first container found with this id.
|
Context
|
getContext()
Return the Android Context this screen is linked with (an activity context for the home, app drawer and lock screens, a service context for the floating desktop).
|
Desktop
|
getCurrentDesktop()
Returns the currently displayed desktop.
|
Container
|
getFocusedContainer()
Returns the focused container.
|
Item
|
getItemById(int id)
Returns an item by its id.
|
float
|
getLastTouchScreenX()
Absolute X position in the screen space of the last touch event.
|
float
|
getLastTouchScreenY()
Absolute Y position in the screen space of the last touch event.
|
float
|
getLastTouchX()
Absolute X position in the container space of the last touch event.
|
float
|
getLastTouchY()
Absolute Y position in the container space of the last touch event.
|
Folder[]
|
getOpenFolders()
Returns the list of currently open folders.
|
boolean
|
isPaused()
Returns whether the current screen is paused.
|
void
|
runAction(int action, String data)
Same as #runAction(int,Item,String) with a null item and data.
|
void
|
runAction(int action, Item item, String data)
Run a Lightning action.
|
void
|
runAction(int action)
Same as #runAction(int,String) with a null data.
|
void
|
runScript(String name, String data)
Run another script.
|
void
|
runScript(String path, String name, String data)
Run another script.
|
boolean
|
startActivity(Intent intent)
Start an activity.
|
String
|
toString()
|
|
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Methods
public
Desktop
getDesktopByName
(String name)
Returns a desktop by its name, as set in the "Configure desktop" screen. The desktop name can be retrieved using getName()
.
This method will return undefined if the no desktop by that name can be found
public
void
goToDesktop
(int id)
Go to a specified desktop, without changing the current position in this desktop.
public
void
goToDesktopPosition
(int id, float x, float y, float scale, boolean animate)
Go to a specified desktop and set the current absolute position in this desktop. This method does nothing when the script is run in background.
Parameters
id |
desktop identifier |
x |
absolute X position, in pixel |
y |
absolute Y position, in pixel |
scale |
zoom factor (1=100%, 0.5=50%, negative values are acceptable, 0 is not very useful) |
animate |
whether to animate the move
|
public
void
goToDesktopPosition
(int id, float x, float y)
Go to a specified desktop and set the current absolute position in this desktop, setting a scale of 1 and using animations. This method does nothing when the script is run in background.
Parameters
id |
desktop identifier |
x |
absolute X position, in pixel |
y |
absolute Y position, in pixel
|