public class

HomeScreen

extends ActivityScreen
java.lang.Object
   ↳ net.pierrox.lightning_launcher.script.api.screen.Screen
     ↳ net.pierrox.lightning_launcher.script.api.screen.ActivityScreen
       ↳ net.pierrox.lightning_launcher.script.api.screen.HomeScreen

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 goToDesktopPage(int id, float x, float y)
Go to a specified desktop and navigate to the specified page, with animation and a 1x scale.
void goToDesktopPage(int id, float x, float y, float scale, boolean animate)
Go to a specified desktop and navigate to the specified page.
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
From class net.pierrox.lightning_launcher.script.api.screen.Screen
From class java.lang.Object

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

Parameters
name name of the desktop

public void goToDesktop (int id)

Go to a specified desktop, without changing the current position in this desktop.

Parameters
id desktop identifier

public void goToDesktopPage (int id, float x, float y)

Go to a specified desktop and navigate to the specified page, with animation and a 1x scale. This method does nothing when the script is run in background. The benefit of using page coordinates is that it doesn't depend on the container geometry (screen orientation or resolution).

Parameters
id desktop identifier
x horizontal page position
y vertical page position

public void goToDesktopPage (int id, float x, float y, float scale, boolean animate)

Go to a specified desktop and navigate to the specified page. This method does nothing when the script is run in background. The benefit of using page coordinates is that it doesn't depend on the container geometry (screen orientation or resolution).

Parameters
id desktop identifier
x horizontal page position
y vertical page position
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, 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