Added in API level 1
Nested Classes | ||
---|---|---|
enum | SmallAppWindow.WindowState | The state of the Window. |
class | SmallAppWindow.Attributes | Attributes of the Window. |
interface | SmallAppWindow.OnWindowFocusChangeListener | Interface definition for a callback to be invoked when the Window focus is changed. |
interface | SmallAppWindow.OnWindowStateChangeListener | Interface definition for a callback to be invoked when the state of a Window is changed. |
Public Methods | |
---|---|
final SmallAppWindow.Attributes |
getAttributes()
Retrieve attributes for this Window. |
final SmallAppWindow.WindowState |
getWindowState()
Get a current Window state. |
void |
setAttributes(SmallAppWindow.Attributes attr)
Set attributes to this Window. |
void |
setBackgroundDrawable(android.graphics.drawable.Drawable drawable)
Change the background of this Window to a custom Drawable. |
void |
setHeaderView(android.view.View view)
Set the view such as option menus to header area. |
void |
setOnWindowFocusChangeListener(SmallAppWindow.OnWindowFocusChangeListener l)
Register a callback to be invoked when the Window focus is changed. |
void |
setOnWindowStateChangeListener(SmallAppWindow.OnWindowStateChangeListener l)
Register a callback to be invoked when the state of a Window is changed. |
void |
setSoftInputMode(int mode)
Apply the soft input mode, as per android.view.WindowManager.LayoutParams.softInputMode. |
void |
setWindowState(SmallAppWindow.WindowState state)
Change the state of this Window. |
void |
setWindowTheme(int resId)
Set the theme for this Window. |
Retrieve attributes for this Window.
Attributes for this Window.
Get a current Window state.
Current Window state
Set attributes to this Window.
attr | Attributes. |
---|
Change the background of this Window to a custom Drawable. The padding value of the Drawable is used to determine where the content view specified by setContentView(android.view.View) should be placed.
drawable | The new Window background. |
---|
Set the view such as option menus to header area.
view | The desired view. |
---|
Register a callback to be invoked when the Window focus is changed.
l | The callback that will run |
---|
Register a callback to be invoked when the state of a Window is changed.
l | The callback that will run |
---|
Apply the soft input mode, as per android.view.WindowManager.LayoutParams.softInputMode.
mode | Mode specifying soft input mode for this Window, as per android.view.WindowManager.LayoutParams.softInputMode. |
---|
Change the state of this Window.
state | A state to be set |
---|
SmallAppWindow represents the Window which renders the Small App content. It provides UI components such as a background, title area, drag handler, resize handler, close button, etc.
The SmallAppWindow instance is created automatically for the Small App, and you can access the SmallAppWindow instance associated to your Small App using getWindow().