Sony Addon SDK

Added in API level 1

public class

SmallAppWindow

This project is no longer being supported and will not get any further updates.
extends java.lang.Object
  1. java.lang.Object
  2. com.sony.smallapp.SmallAppWindow

Class Overview

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().

Summary

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.

Public Methods

Added in API level 1 public final SmallAppWindow.Attributes getAttributes()

Retrieve attributes for this Window.

Returns

Attributes for this Window.

Added in API level 1 public final SmallAppWindow.WindowState getWindowState()

Get a current Window state.

Returns

Current Window state

Added in API level 1 public void setAttributes(SmallAppWindow.Attributes attr)

Set attributes to this Window.

Parameters
attr Attributes.

Added in API level 1 public void setBackgroundDrawable(android.graphics.drawable.Drawable drawable)

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.

Parameters
drawable The new Window background.

Added in API level 1 public void setHeaderView(android.view.View view)

Set the view such as option menus to header area.

Parameters
view The desired view.

Added in API level 1 public void setOnWindowFocusChangeListener(SmallAppWindow.OnWindowFocusChangeListener l)

Register a callback to be invoked when the Window focus is changed.

Parameters
l The callback that will run

Added in API level 1 public void setOnWindowStateChangeListener(SmallAppWindow.OnWindowStateChangeListener l)

Register a callback to be invoked when the state of a Window is changed.

Parameters
l The callback that will run

Added in API level 1 public void setSoftInputMode(int mode)

Apply the soft input mode, as per android.view.WindowManager.LayoutParams.softInputMode.

Parameters
mode Mode specifying soft input mode for this Window, as per android.view.WindowManager.LayoutParams.softInputMode.

Added in API level 1 public void setWindowState(SmallAppWindow.WindowState state)

Change the state of this Window.

Parameters
state A state to be set

Added in API level 2 public void setWindowTheme(int resId)

Set the theme for this Window.

Parameters
resId One of Dark or Light