This interface contains methods which an application can use to control some aspects of the Launcher's operation. More...
A class implementing this interface should be passed to Launcher.initForApplication() at startup time.
Public Member Functions | |
| default boolean | shouldShowButton (Activity activity) |
| Override whether the launcher button should be shown on the specified Activity. More... | |
| default boolean | shouldShowCoachmark () |
| Override whether the coaching screen should be shown at first use. More... | |
| default void | onSettingsCommand () |
| Invoked when user taps on Settings icon. More... | |
| default void | onSettingsCommand (Activity originActivity) |
| Invoked when user taps on Settings icon. More... | |
| default boolean shouldShowButton | ( | Activity | activity | ) |
The default is that the button will be shown for all Activities.
Note that as the default implementation returns true, the only reason to provide a different implementation is to return false, i.e. to prevent the launcher button from being shown for an Activity.
| default boolean shouldShowCoachmark | ( | ) |
This screen is normally shown to explain the use of the Launcher, the first time it appears after the app is activated. This delegate method may be used to override this behavior.
Note that as the default implementation returns true, the only reason to provide a different implementation is to return false, i.e. to prevent the coaching screen from being shown.
| default void onSettingsCommand | ( | ) |
The application should show its settings screen. Note that this will always be called on the UI thread.
| default void onSettingsCommand | ( | Activity | originActivity | ) |
The application should show its settings screen. Note that this will always be called on the UI thread.
This flavor of onSettingsCommand is preferred, and will always be called if it is overridden.
| originActivity | the current Activity, provided so that a startActivity() call can be made without starting a new task. |