com.iristick.smartglass.support.app
Class IristickConfiguration¶
- java.lang.Object
-
- com.iristick.smartglass.support.app.IristickConfiguration
public final class IristickConfiguration extends Object
Configuration for the Iristick app support library.
An instance of this class may be passed to the
IristickApp.init(Application, IristickConfiguration)
method to modify the way the
support library interacts with the app.Constructor Summary¶
Constructor and Description |
---|
IristickConfiguration()
Create the default library configuration.
|
Method Summary¶
Modifier and Type | Method and Description |
---|---|
IristickConfiguration |
setHudHideNavBar(boolean enable)
When a headset is attached and interaction goes through the heads-up display (i.e., the
pocket unit and phone are hidden away), the support library will hide the navigation bar
(i.e., the bar with "back", "home", and "recent" buttons).
|
IristickConfiguration |
setHudHideStatusBar(boolean enable)
When a headset is attached and interaction goes through the heads-up display (i.e., the
pocket unit and phone are hidden away), the support library can optionally hide
the status bar (i.e., the top bar with clock and notifications).
|
IristickConfiguration |
setHudNoTouch(boolean enable)
When a headset is attached and interaction goes through the heads-up display (i.e., the
pocket unit and phone are hidden away), the support library will modify the context of
activities to indicate that no touchscreen is available.
|
IristickConfiguration |
setRecreateOnAttachDetach(boolean enable)
When a headset is attached or detached, the support library will, by default, recreate
activities to simulate a configuration change.
|
Methods inherited from class java.lang.Object¶
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail¶
IristickConfiguration¶
public IristickConfiguration()
Create the default library configuration.
Method Detail¶
setRecreateOnAttachDetach¶
@NonNull public IristickConfiguration setRecreateOnAttachDetach(boolean enable)
When a headset is attached or detached, the support library will, by default, recreate
activities to simulate a configuration change. Activities can retrieve the attached headset
with
IristickApp.getHeadset()
at creation time to adapt its behaviour.- Parameters:
enable
-true
to recreate activities of headset attach/detach.- Returns:
- This configuration object for method chaining.
setHudHideNavBar¶
@NonNull public IristickConfiguration setHudHideNavBar(boolean enable)
When a headset is attached and interaction goes through the heads-up display (i.e., the
pocket unit and phone are hidden away), the support library will hide the navigation bar
(i.e., the bar with "back", "home", and "recent" buttons).
- Parameters:
enable
- Set tofalse
to disable the described behaviour.- Returns:
- This configuration object for method chaining.
setHudHideStatusBar¶
@NonNull public IristickConfiguration setHudHideStatusBar(boolean enable)
When a headset is attached and interaction goes through the heads-up display (i.e., the
pocket unit and phone are hidden away), the support library can optionally hide
the status bar (i.e., the top bar with clock and notifications).
- Parameters:
enable
- Set totrue
to enable the described behaviour.- Returns:
- This configuration object for method chaining.
setHudNoTouch¶
@NonNull public IristickConfiguration setHudNoTouch(boolean enable)
When a headset is attached and interaction goes through the heads-up display (i.e., the
pocket unit and phone are hidden away), the support library will modify the context of
activities to indicate that no touchscreen is available.
Alternative resources with the "
-notouch
" attribute will be used if available.
Only activities that call IristickApp.wrapContext(Context)
will be affected.
- Parameters:
enable
- Set tofalse
to disable the described behaviour.- Returns:
- This configuration object for method chaining.