ActionComponents  04.05.00
Customizable UI and time-saving tools for Android development with Xamarin and Visual Studio.
ActionComponents.ACTray Class Reference

The ActionComponents.ACTray is a dockable, customizable, slide-out View controller with a dragTab that can be attached to the edge of any parent View. The ActionComponents.ACTray handles sliding the attached View based on the ActionComponents.ACTrayType. More...

Inheritance diagram for ActionComponents.ACTray:
Collaboration diagram for ActionComponents.ACTray:

Public Member Functions

 ACTray (Context context)
 Initializes a new instance of the ActionComponents.ACTray class. More...
 
 ACTray (Context context, Display display)
 Initializes a new instance of the ActionComponents.ACTray class. More...
 
 ACTray (Context context, IAttributeSet attrs)
 Initializes a new instance of the ActionComponents.ACTray class. More...
 
 ACTray (Context context, ACTrayAppearance appearance)
 Initializes a new instance of the ActionComponents.ACTray class. More...
 
void Redraw ()
 Forces the ActionComponents.ACTray to dump it's draw buffer and completely redraw the control More...
 
void RestoreState (string value)
 Restores the state of this ActionComponents.ACTray after a rotation or restart More...
 
void OpenTray (bool animated)
 Opens the ActionComponents.ACTray More...
 
void CloseTray (bool animated)
 Closes the ActionComponents.ACTray More...
 
void MoveTo (int x, int y)
 Moves the ActionComponents.ACTray to the given x,y coordinates More...
 
override bool OnTouchEvent (MotionEvent e)
 Raises the touch event event. More...
 
delegate void ACTrayTouchDelegate (ACTray tray)
 Occurs when this ActionComponents.ACTray is touched More...
 
delegate void ACTrayMovedDelegate (ACTray tray)
 Occurs when this ActionComponents.ACTray is moved More...
 
delegate void ACTrayReleasedDelegate (ACTray tray)
 Occurs when this ActionComponents.ACTray was Touched and released More...
 
delegate void ACTrayOpenedDelegate (ACTray tray)
 Occurs when this ActionComponents.ACTray is opened fully by the user More...
 
delegate void ACTrayClosedDelegate (ACTray tray)
 Occurs when this ActionComponents.ACTray is completely closed by the user More...
 
delegate void CustomDrawDragTabDelegate (ACTray tray, Canvas canvas, Rect rect)
 Occurs when the ActionComponents.ACTrayTabType is set to CustomDrawn and the dragTab needs to be drawn More...
 
delegate void TraySizeChangedDelegate (ACTray tray, CGSize size)
 Occurs when the size of the tray is changed. More...
 
delegate void TrayLocationChangedDelegate (ACTray tray, CGPoint location)
 Occurs when the tray's location has changed. More...
 

Public Attributes

object tag
 [OPTIONAL] Tag to hold user information about this control More...
 
bool bringToFrontOnTouch =false
 If true the ActionComponents.ACTray becomes the top most view when it is touched by the user More...
 

Protected Member Functions

override void OnDraw (Canvas canvas)
 Raises the draw event. More...
 

Properties

bool isClosed [get]
 Gets a value indicating whether this ActionComponents.ACTray is closed. More...
 
bool isOpened [get]
 Gets a value indicating whether this ActionComponents.ACTray is opened. More...
 
bool dragging [get]
 Gets a value indicating whether this ActionComponents.ACTray is dragging. More...
 
int amountVisible [get]
 Gets the current amount of the ActionComponents.ACTray's ContentArea that is currently visible on screen More...
 
string SaveState [get]
 Returns a string containing the save state of this ActionComponents.ACTray More...
 
View SuperView [get]
 Gets the parent view for this ActionComponents.ACTray More...
 
RelativeLayout.LayoutParams layoutParams [get]
 Gets the layout parameters typecast to a RelativeLayout.LayoutParams format More...
 
int LeftMargin [get, set]
 Gets or sets the left margin. More...
 
int TopMargin [get, set]
 Gets or sets the top margin. More...
 
int RightMargin [get, set]
 Gets or sets the right margin. More...
 
int BottomMargin [get, set]
 Gets or sets the bottom margin. More...
 
int LayoutWidth [get, set]
 Gets or sets the width of the layout. More...
 
int LayoutHeight [get, set]
 Gets or sets the height of the layout. More...
 
ACTrayOrientation orientation [get, set]
 Gets or sets the orientation of this ActionComponents.ACTray on the screen More...
 
ACTrayTabLocation tabLocation [get, set]
 Gets or sets the location of the dragTab> on this ActionComponents.ACTray More...
 
ACTrayTabType tabType [get, set]
 Gets or sets the type of the dragTab drawn on this ActionComponents.ACTray More...
 
ACTrayFrameType frameType [get, set]
 Gets or sets the type of the frame drawn around the edge of this ActionComponents.ACTray More...
 
int tabOffset [get, set]
 Gets or sets the tab offset for a Custom ActionComponents.ACTrayTabLocation More...
 
int tabWidth [get, set]
 Gets or sets the width of the dragTab for this ActionComponents.ACTray More...
 
int icon [get, set]
 Gets or sets the icon displayed on the dragTab of this ActionComponents.ACTray More...
 
string title [get, set]
 Gets or sets the title for the ActionComponents.ACTray's dragTab More...
 
ACTrayAppearance appearance [get, set]
 Controlls the general appearance of the control More...
 
ACTrayType trayType [get, set]
 Gets or sets the ActionComponents.ACTrayType of this ActionComponents.ACTray More...
 
CGSize TraySize [get, set]
 Gets or sets the size of the tray. More...
 
CGPoint TrayLocation [get, set]
 Gets or sets the tray location. More...
 
CGRect TabArea [get]
 Gets the tab area. More...
 
CGRect ContentArea [get]
 Gets the safe content area based on how the tray is oriented. More...
 

Events

ACTrayTouchDelegate Touched
 
ACTrayMovedDelegate Moved
 
ACTrayReleasedDelegate Released
 
ACTrayOpenedDelegate Opened
 
ACTrayClosedDelegate Closed
 
CustomDrawDragTabDelegate CustomDrawDragTab
 
TraySizeChangedDelegate TraySizeChanged
 
TrayLocationChangedDelegate TrayLocationChanged
 

Detailed Description

The ActionComponents.ACTray is a dockable, customizable, slide-out View controller with a dragTab that can be attached to the edge of any parent View. The ActionComponents.ACTray handles sliding the attached View based on the ActionComponents.ACTrayType.

The ActionComponents.ACTray can be styled by setting its ActionComponents.ACTrayAppearance and ActionComponents.ACTrayTabType properties. You can also control the position of the dragTab by setting the tray's ActionComponents.ACTrayTabLocation, tabOffset and tabWidth properties.

WARNING! You MUST manually set the ActionComponents.ACTray's ActionComponents.ACTrayOrientation when the View first loads or the tray will not display or behave correctly.

Constructor & Destructor Documentation

ActionComponents.ACTray.ACTray ( Context  context)

Initializes a new instance of the ActionComponents.ACTray class.

Parameters
contextContext.
ActionComponents.ACTray.ACTray ( Context  context,
Display  display 
)

Initializes a new instance of the ActionComponents.ACTray class.

Parameters
contextContext.
displayDisplay.
ActionComponents.ACTray.ACTray ( Context  context,
IAttributeSet  attrs 
)

Initializes a new instance of the ActionComponents.ACTray class.

Parameters
contextContext.
attrsAttrs.
ActionComponents.ACTray.ACTray ( Context  context,
ACTrayAppearance  appearance 
)

Initializes a new instance of the ActionComponents.ACTray class.

Parameters
contextContext.
appearanceAppearance.

Here is the call graph for this function:

Member Function Documentation

delegate void ActionComponents.ACTray.ACTrayClosedDelegate ( ACTray  tray)

Occurs when this ActionComponents.ACTray is completely closed by the user

delegate void ActionComponents.ACTray.ACTrayMovedDelegate ( ACTray  tray)

Occurs when this ActionComponents.ACTray is moved

delegate void ActionComponents.ACTray.ACTrayOpenedDelegate ( ACTray  tray)

Occurs when this ActionComponents.ACTray is opened fully by the user

delegate void ActionComponents.ACTray.ACTrayReleasedDelegate ( ACTray  tray)

Occurs when this ActionComponents.ACTray was Touched and released

delegate void ActionComponents.ACTray.ACTrayTouchDelegate ( ACTray  tray)

Occurs when this ActionComponents.ACTray is touched

Here is the caller graph for this function:

void ActionComponents.ACTray.CloseTray ( bool  animated)

Closes the ActionComponents.ACTray

Parameters
animatedIf set to true animated.

Here is the caller graph for this function:

delegate void ActionComponents.ACTray.CustomDrawDragTabDelegate ( ACTray  tray,
Canvas  canvas,
Rect  rect 
)

Occurs when the ActionComponents.ACTrayTabType is set to CustomDrawn and the dragTab needs to be drawn

The passed rect contains the boundary that the custom tab should be drawn against

void ActionComponents.ACTray.MoveTo ( int  x,
int  y 
)

Moves the ActionComponents.ACTray to the given x,y coordinates

Parameters
xThe x coordinate.
yThe y coordinate.

Here is the call graph for this function:

override void ActionComponents.ACTray.OnDraw ( Canvas  canvas)
protected

Raises the draw event.

Parameters
canvasCanvas.
override bool ActionComponents.ACTray.OnTouchEvent ( MotionEvent  e)

Raises the touch event event.

Parameters
eE.

Here is the call graph for this function:

void ActionComponents.ACTray.OpenTray ( bool  animated)

Opens the ActionComponents.ACTray

Parameters
animatedIf set to true animated.

Here is the caller graph for this function:

void ActionComponents.ACTray.Redraw ( )

Forces the ActionComponents.ACTray to dump it's draw buffer and completely redraw the control

Here is the caller graph for this function:

void ActionComponents.ACTray.RestoreState ( string  value)

Restores the state of this ActionComponents.ACTray after a rotation or restart

Parameters
valueValue.

The value MUST have been generate by the SaveState property of the ActionTray or an error could result

Here is the call graph for this function:

delegate void ActionComponents.ACTray.TrayLocationChangedDelegate ( ACTray  tray,
CGPoint  location 
)

Occurs when the tray's location has changed.

delegate void ActionComponents.ACTray.TraySizeChangedDelegate ( ACTray  tray,
CGSize  size 
)

Occurs when the size of the tray is changed.

Member Data Documentation

bool ActionComponents.ACTray.bringToFrontOnTouch =false

If true the ActionComponents.ACTray becomes the top most view when it is touched by the user

object ActionComponents.ACTray.tag

[OPTIONAL] Tag to hold user information about this control

Property Documentation

int ActionComponents.ACTray.amountVisible
get

Gets the current amount of the ActionComponents.ACTray's ContentArea that is currently visible on screen

The amount of the ContentArea that is currently visible

NOTE: This amount excludes the always visible DragTab

ACTrayAppearance ActionComponents.ACTray.appearance
getset

Controlls the general appearance of the control

int ActionComponents.ACTray.BottomMargin
getset

Gets or sets the bottom margin.

The bottom margin.

CGRect ActionComponents.ACTray.ContentArea
get

Gets the safe content area based on how the tray is oriented.

The safe content area that avoids the tab area.

bool ActionComponents.ACTray.dragging
get

Gets a value indicating whether this ActionComponents.ACTray is dragging.

true if dragging; otherwise, false.

ACTrayFrameType ActionComponents.ACTray.frameType
getset

Gets or sets the type of the frame drawn around the edge of this ActionComponents.ACTray

The type of the frame.

This property reacts with the ActionComponents.ACTrayOrientation property to control the appearance and the location of the frame

int ActionComponents.ACTray.icon
getset

Gets or sets the icon displayed on the dragTab of this ActionComponents.ACTray

The icon.

The icon will be displayed based on the dragTab's ActionComponents.ACTrayTabType

bool ActionComponents.ACTray.isClosed
get

Gets a value indicating whether this ActionComponents.ACTray is closed.

true if is closed; otherwise, false.

bool ActionComponents.ACTray.isOpened
get

Gets a value indicating whether this ActionComponents.ACTray is opened.

true if is opened; otherwise, false.

int ActionComponents.ACTray.LayoutHeight
getset

Gets or sets the height of the layout.

The height of the layout.

RelativeLayout.LayoutParams ActionComponents.ACTray.layoutParams
get

Gets the layout parameters typecast to a RelativeLayout.LayoutParams format

The layout parameters.

int ActionComponents.ACTray.LayoutWidth
getset

Gets or sets the width of the layout.

The width of the layout.

int ActionComponents.ACTray.LeftMargin
getset

Gets or sets the left margin.

The left margin.

ACTrayOrientation ActionComponents.ACTray.orientation
getset

Gets or sets the orientation of this ActionComponents.ACTray on the screen

The tray's orientation.

This property controls how the ActionComponents.ACTray responds to user interaction and where the dragTab is located

int ActionComponents.ACTray.RightMargin
getset

Gets or sets the right margin.

The right margin.

string ActionComponents.ACTray.SaveState
get

Returns a string containing the save state of this ActionComponents.ACTray

The current state of the ActionTray

Pass this value to the RestoreState property of the ActionTray after a rotation or restart to return the tray to it's previous state

View ActionComponents.ACTray.SuperView
get

Gets the parent view for this ActionComponents.ACTray

The super view.

CGRect ActionComponents.ACTray.TabArea
get

Gets the tab area.

The tab area.

ACTrayTabLocation ActionComponents.ACTray.tabLocation
getset

Gets or sets the location of the dragTab> on this ActionComponents.ACTray

The tab location.

This property interacts with the ActionComponents.ACTrayOrientation property

int ActionComponents.ACTray.tabOffset
getset

Gets or sets the tab offset for a Custom ActionComponents.ACTrayTabLocation

The tab offset.

Based on the ActionComponents.ACTray's ActionComponents.ACTrayOrientation, the offset will either be from the tray's top or left side

ACTrayTabType ActionComponents.ACTray.tabType
getset

Gets or sets the type of the dragTab drawn on this ActionComponents.ACTray

The type of the tab.

The ActionComponents.ACTrayAppearance also controls the appearance of the dragTab

int ActionComponents.ACTray.tabWidth
getset

Gets or sets the width of the dragTab for this ActionComponents.ACTray

The width of the tab.

The minimum width is 30 pixels.

string ActionComponents.ACTray.title
getset

Gets or sets the title for the ActionComponents.ACTray's dragTab

The title.

This title will be displayed based on the dragTab's ActionComponents.ACTrayTabType

int ActionComponents.ACTray.TopMargin
getset

Gets or sets the top margin.

The top margin.

CGPoint ActionComponents.ACTray.TrayLocation
getset

Gets or sets the tray location.

The tray location.

CGSize ActionComponents.ACTray.TraySize
getset

Gets or sets the size of the tray.

The size of the tray.

The developer is responsible for resizing and repositioning the contents of the trays.

ACTrayType ActionComponents.ACTray.trayType
getset

Gets or sets the ActionComponents.ACTrayType of this ActionComponents.ACTray

The type of the tray.

Event Documentation

ACTrayClosedDelegate ActionComponents.ACTray.Closed
CustomDrawDragTabDelegate ActionComponents.ACTray.CustomDrawDragTab
ACTrayMovedDelegate ActionComponents.ACTray.Moved
ACTrayOpenedDelegate ActionComponents.ACTray.Opened
ACTrayReleasedDelegate ActionComponents.ACTray.Released
ACTrayTouchDelegate ActionComponents.ACTray.Touched
TrayLocationChangedDelegate ActionComponents.ACTray.TrayLocationChanged
TraySizeChangedDelegate ActionComponents.ACTray.TraySizeChanged