A layout manager for Android. More...
Public Member Functions | |
LayoutManager (ViewGroup container) | |
Initializes a new instance of the LayoutManager class. More... | |
LayoutManager (ViewGroup container, LayoutPreset preset) | |
Initializes a new instance of the LayoutManager class. More... | |
ViewGroup | getContainer () |
Gets the layout container. More... | |
void | setMode (LayoutMode value) |
Gets or sets the mode used by the layout engine. Defaults to LayoutMode.FloatLocal. More... | |
void | layout () |
Positions the local and remote views within the layout. More... | |
![]() | |
void | addOnLayout (fm.liveswitch.IAction1< fm.liveswitch.Layout > value) |
Adds a handler that is raised when a layout is calculated. More... | |
boolean | addRemoteMedia (fm.liveswitch.IViewableMedia< T > remoteMedia) |
Adds remote media to the layout. More... | |
boolean | addRemoteView (String idValue, T view) |
Adds a remote view to the layout. More... | |
boolean | addRemoteViews (String[] ids, T[] views) |
Adds remote views to the layout. More... | |
fm.liveswitch.LayoutOrigin | getLayoutOrigin () |
Gets the layout origin. More... | |
T | getLocalView () |
Gets the local view from the layout. More... | |
T | getRemoteView (String idValue) |
Gets a remote view from the layout. More... | |
String[] | getRemoteViewIds () |
Gets the IDs of the remote views in the layout. More... | |
java.util.ArrayList< T > | getRemoteViews () |
Gets all remote views from the layout. More... | |
java.util.ArrayList< T > | getRemoteViews (String[] ids) |
Gets remote views from the layout. More... | |
abstract void | layout () |
Positions the local and remote views within the layout. More... | |
LayoutManager () | |
Initializes a new instance of the fm.liveswitch.LayoutManager class. More... | |
LayoutManager (fm.liveswitch.LayoutPreset preset) | |
Initializes a new instance of the fm.liveswitch.LayoutManager class. More... | |
void | layoutOnMainThread () |
Positions the local and remote views within the layout after dispatching to the main thread. More... | |
void | removeOnLayout (fm.liveswitch.IAction1< fm.liveswitch.Layout > value) |
Removes a handler that is raised when a layout is calculated. More... | |
boolean | removeRemoteMedia (fm.liveswitch.IViewableMedia< T > remoteMedia) |
Removes remote media from the layout. More... | |
boolean | removeRemoteView (String idValue) |
Removes a remote view from the layout. More... | |
void | removeRemoteViews () |
Removes all remote views from the layout. More... | |
boolean | removeRemoteViews (String[] ids) |
Removes remote views from the layout. More... | |
void | reset () |
Removes all remote views from the layout, then removes the local view from the layout. More... | |
boolean | setLocalMedia (fm.liveswitch.IViewableMedia< T > localMedia) |
Adds the local media to the layout. More... | |
boolean | setLocalView (T view) |
Adds the local view to the layout. More... | |
boolean | swapRemoteMedia (fm.liveswitch.IViewableMedia< T > remoteMediaToRemove, fm.liveswitch.IViewableMedia< T > remoteMediaToAdd) |
Swaps remote media in the layout. More... | |
boolean | swapRemoteView (String idToRemove, String idToAdd, T viewToAdd) |
Swaps a remote view in the layout. More... | |
boolean | swapRemoteViews (String[] idsToRemove, String[] idsToAdd, T[] viewsToAdd) |
Swaps remote views in the layout. More... | |
boolean | unsetLocalView () |
Removes the local view from the layout. More... | |
Protected Member Functions | |
void | addView (View view) |
Adds a view to the container. More... | |
void | removeView (View view) |
Removes a view from the container. More... | |
void | dispatchToMainThread (final IAction2< Object, Object > action, final Object arg1, final Object arg2) |
Dispatches an action to the main thread. More... | |
void | initializeOnGlobalLayout () |
Attempts to initialize the layout using the global layout listener until successful. More... | |
boolean | initializeLayout () |
Initializes the layout. More... | |
![]() | |
abstract void | addView (T view) |
Adds a view to the container. More... | |
abstract void | dispatchToMainThread (fm.liveswitch.IAction2< Object, Object > action, Object arg1, Object arg2) |
Dispatches an action to the main thread. More... | |
T | doGetLocalView () |
Gets the local view. More... | |
java.util.ArrayList< T > | doGetRemoteViews (String idValue) |
Gets the remote views for a given remote view ID. More... | |
String[] | doGetRemoteViewsIds () |
Gets the remote view IDs. More... | |
fm.liveswitch.Layout | getLayout (int layoutWidth, int layoutHeight, boolean local, int remoteCount) |
Gets a video frame layout. More... | |
fm.liveswitch.Layout | getLayout (int layoutWidth, int layoutHeight, boolean local, int remoteCount, String[] remoteViewIds) |
Gets a video frame layout. More... | |
fm.liveswitch.Layout | getLayout (int layoutWidth, int layoutHeight, boolean local, int remoteCount, String[] remoteViewIds, fm.liveswitch.Size localVideoSize, fm.liveswitch.Size[] remoteVideoSizes) |
Gets a video frame layout. More... | |
fm.liveswitch.Layout | getLayout (int layoutWidth, int layoutHeight, int remoteCount) |
Gets a video frame layout. More... | |
fm.liveswitch.Layout | getLayout (int layoutWidth, int layoutHeight, int remoteCount, String[] remoteViewIds) |
Gets a video frame layout. More... | |
abstract void | removeView (T view) |
Removes a view from the container. More... | |
void | setLayoutOrigin (fm.liveswitch.LayoutOrigin value) |
Sets the layout origin. More... | |
A layout manager for Android.
fm.liveswitch.android.LayoutManager.LayoutManager | ( | ViewGroup | container | ) |
Initializes a new instance of the LayoutManager class.
container | The layout container. |
fm.liveswitch.android.LayoutManager.LayoutManager | ( | ViewGroup | container, |
LayoutPreset | preset | ||
) |
Initializes a new instance of the LayoutManager class.
container | The layout container. |
preset | The layout preset. |
|
protected |
Adds a view to the container.
view | The view to add. |
|
protected |
Dispatches an action to the main thread.
action | The action to invoke. |
arg1 | The first argument. |
arg2 | The second argument. |
ViewGroup fm.liveswitch.android.LayoutManager.getContainer | ( | ) |
Gets the layout container.
|
protected |
Initializes the layout.
|
protected |
Attempts to initialize the layout using the global layout listener until successful.
void fm.liveswitch.android.LayoutManager.layout | ( | ) |
Positions the local and remote views within the layout.
|
protected |
Removes a view from the container.
view | The view to remove. |
void fm.liveswitch.android.LayoutManager.setMode | ( | LayoutMode | value | ) |
Gets or sets the mode used by the layout engine. Defaults to LayoutMode.FloatLocal.