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

The ActionComponents.ACWebView is a custom WebView with built-in helper routines to automatically handle user interaction such as dragging (with optional constraints on the x and y axis), events such as Touched, Moved and Released and moving, and resizing. The ActionComponents.ACWebView includes methods to assist in loading content for display. More...

Inheritance diagram for ActionComponents.ACWebView:
Collaboration diagram for ActionComponents.ACWebView:

Public Member Functions

 ACWebView (Context context)
 Initializes a new instance of the ActionComponents.ACWebView class. More...
 
 ACWebView (Context context, IAttributeSet attr)
 Initializes a new instance of the ActionComponents.ACWebView class. More...
 
 ACWebView (IntPtr javaReference, JniHandleOwnership transfer)
 Initializes a new instance of the ActionComponents.ACWebView class. More...
 
 ACWebView (Context context, IAttributeSet attr, int defStyle)
 Initializes a new instance of the ActionComponents.ACWebView class. More...
 
void LoadAsset (string filename)
 Populates the ActionComponents.ACWebView with the given file in the assests directory More...
 
void LoadMarkdown (string markdownText)
 Loads the given Markdown text, trasnforms it into HTML and displays the results More...
 
void ClearContents ()
 Clears the contents of this ActionComponents.ACWebView More...
 
void MoveToPoint (int x, int y)
 Moves this ActionComponents.ACWebView to the given point and honors any ActionComponents.ACWebViewDragConstraints applied to the X or Y axis More...
 
void MoveToPoint (Point point)
 Moves this ActionComponents.ACWebView to the given point and honors any ActionComponents.ACWebViewDragConstraints applied to the X or Y axis More...
 
void Resize (int width, int height)
 Resize this ActionComponents.ACWebView to the specified width and height. More...
 
bool PointInside (int x, int y)
 Test to see if the given x and y coordinates are inside this ActionComponents.ACWebView More...
 
bool PointInside (Point pt)
 Test to see if the given point is inside this ActionComponents.ACWebView More...
 
void Purge (bool forceGarbageCollection)
 The Purge command causes this ActionComponents.ACWebView to force the removal of any subview from the screen and dispose of the memory that they contain. If forceGarbageCollection is true, garbage collection will be forced at the end of the purge cycle. The Purge command will cascade to any ActionComponents.ACWebView or ActionComponents.ACImageView subviews attached to this ActionComponents.ACWebView More...
 
override bool OnTouchEvent (MotionEvent e)
 Raises the touch event event. More...
 
delegate void ACWebViewTouchedDelegate (ACWebView view)
 Occurs when this ActionComponents.ACWebView is touched More...
 
delegate void ACWebViewMovedDelegate (ACWebView view)
 Occurs when this ActionComponents.ACWebView is moved More...
 
delegate void ACWebViewReleasedDelegate (ACWebView view)
 Occurs when this ActionComponents.ACWebView is released More...
 

Properties

Object tag [get, set]
 Gets or sets the [OPTIONAL] tag that can be assosciated with this ActionComponents.ACWebView More...
 
bool draggable [get, set]
 Gets or sets a value indicating whether this ActionComponents.ACWebView is draggable. More...
 
bool dragging [get]
 Gets a value indicating whether this ActionComponents.ACWebView is being dragged by the user. More...
 
bool bringToFrontOnTouched [get, set]
 Gets or sets a value indicating whether this ActionComponents.ACWebView is automatically brought to the front when touched. More...
 
ACViewDragConstraint xConstraint [get, set]
 Gets or sets the ActionComponents.ACWebViewDragConstraint applied to the x axis of this ActionComponents.ACWebView More...
 
ACViewDragConstraint yConstraint [get, set]
 Gets or sets the ActionComponents.ACWebViewDragConstraint applied to the y axis of this ActionComponents.ACWebView 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...
 

Events

ACWebViewTouchedDelegate Touched
 
ACWebViewMovedDelegate Moved
 
ACWebViewReleasedDelegate Released
 

Detailed Description

The ActionComponents.ACWebView is a custom WebView with built-in helper routines to automatically handle user interaction such as dragging (with optional constraints on the x and y axis), events such as Touched, Moved and Released and moving, and resizing. The ActionComponents.ACWebView includes methods to assist in loading content for display.

NOTICE: The ActionComponents.ACView works best if hosted inside of a RelativeLayout. Available in ActionPack Business or Enterprise only.

Constructor & Destructor Documentation

ActionComponents.ACWebView.ACWebView ( Context  context)

Initializes a new instance of the ActionComponents.ACWebView class.

Parameters
contextContext.
ActionComponents.ACWebView.ACWebView ( Context  context,
IAttributeSet  attr 
)

Initializes a new instance of the ActionComponents.ACWebView class.

Parameters
contextContext.
attrAttr.
ActionComponents.ACWebView.ACWebView ( IntPtr  javaReference,
JniHandleOwnership  transfer 
)

Initializes a new instance of the ActionComponents.ACWebView class.

Parameters
javaReferenceJava reference.
transferTransfer.
ActionComponents.ACWebView.ACWebView ( Context  context,
IAttributeSet  attr,
int  defStyle 
)

Initializes a new instance of the ActionComponents.ACWebView class.

Parameters
contextContext.
attrAttr.
defStyleDef style.

Member Function Documentation

delegate void ActionComponents.ACWebView.ACWebViewMovedDelegate ( ACWebView  view)

Occurs when this ActionComponents.ACWebView is moved

delegate void ActionComponents.ACWebView.ACWebViewReleasedDelegate ( ACWebView  view)

Occurs when this ActionComponents.ACWebView is released

delegate void ActionComponents.ACWebView.ACWebViewTouchedDelegate ( ACWebView  view)

Occurs when this ActionComponents.ACWebView is touched

Here is the caller graph for this function:

void ActionComponents.ACWebView.ClearContents ( )

Clears the contents of this ActionComponents.ACWebView

void ActionComponents.ACWebView.LoadAsset ( string  filename)

Populates the ActionComponents.ACWebView with the given file in the assests directory

Parameters
filenameFilename.

This routine automatically adds "file:///android_asset/" to the filename so you don't have to

void ActionComponents.ACWebView.LoadMarkdown ( string  markdownText)

Loads the given Markdown text, trasnforms it into HTML and displays the results

Parameters
markdownTextMarkdown text.

Here is the call graph for this function:

void ActionComponents.ACWebView.MoveToPoint ( int  x,
int  y 
)

Moves this ActionComponents.ACWebView to the given point and honors any ActionComponents.ACWebViewDragConstraints applied to the X or Y axis

Parameters
xThe x coordinate.
yThe y coordinate.

Here is the caller graph for this function:

void ActionComponents.ACWebView.MoveToPoint ( Point  point)

Moves this ActionComponents.ACWebView to the given point and honors any ActionComponents.ACWebViewDragConstraints applied to the X or Y axis

Parameters
ptPoint.
override bool ActionComponents.ACWebView.OnTouchEvent ( MotionEvent  e)

Raises the touch event event.

Parameters
eE.

Here is the call graph for this function:

bool ActionComponents.ACWebView.PointInside ( int  x,
int  y 
)

Test to see if the given x and y coordinates are inside this ActionComponents.ACWebView

Returns
true, if inside was pointed, false otherwise.
Parameters
xThe x coordinate.
yThe y coordinate.

Here is the caller graph for this function:

bool ActionComponents.ACWebView.PointInside ( Point  pt)

Test to see if the given point is inside this ActionComponents.ACWebView

Returns
true, if inside was pointed, false otherwise.
Parameters
ptPoint.

Here is the call graph for this function:

void ActionComponents.ACWebView.Purge ( bool  forceGarbageCollection)

The Purge command causes this ActionComponents.ACWebView to force the removal of any subview from the screen and dispose of the memory that they contain. If forceGarbageCollection is true, garbage collection will be forced at the end of the purge cycle. The Purge command will cascade to any ActionComponents.ACWebView or ActionComponents.ACImageView subviews attached to this ActionComponents.ACWebView

Parameters
forceGarbageCollectionIf set to true force garbage collection.

Special handling is taken on UIImageViews to ensure that they fully release any image memory that they contain. Simply calling Dispose() doesn't always release the child bitmaps in the ImageView's Image property.

void ActionComponents.ACWebView.Resize ( int  width,
int  height 
)

Resize this ActionComponents.ACWebView to the specified width and height.

Parameters
widthWidth.
heightHeight.

Property Documentation

int ActionComponents.ACWebView.BottomMargin
getset

Gets or sets the bottom margin.

The bottom margin.

bool ActionComponents.ACWebView.bringToFrontOnTouched
getset

Gets or sets a value indicating whether this ActionComponents.ACWebView is automatically brought to the front when touched.

true if bring to front on touched; otherwise, false.

bool ActionComponents.ACWebView.draggable
getset

Gets or sets a value indicating whether this ActionComponents.ACWebView is draggable.

true if is draggable; otherwise, false.

bool ActionComponents.ACWebView.dragging
get

Gets a value indicating whether this ActionComponents.ACWebView is being dragged by the user.

true if dragging; otherwise, false.

int ActionComponents.ACWebView.LayoutHeight
getset

Gets or sets the height of the layout.

The height of the layout.

int ActionComponents.ACWebView.LayoutWidth
getset

Gets or sets the width of the layout.

The width of the layout.

int ActionComponents.ACWebView.LeftMargin
getset

Gets or sets the left margin.

The left margin.

int ActionComponents.ACWebView.RightMargin
getset

Gets or sets the right margin.

The right margin.

Object ActionComponents.ACWebView.tag
getset

Gets or sets the [OPTIONAL] tag that can be assosciated with this ActionComponents.ACWebView

The tag.

int ActionComponents.ACWebView.TopMargin
getset

Gets or sets the top margin.

The top margin.

ACViewDragConstraint ActionComponents.ACWebView.xConstraint
getset

Gets or sets the ActionComponents.ACWebViewDragConstraint applied to the x axis of this ActionComponents.ACWebView

The x constraint.

ACViewDragConstraint ActionComponents.ACWebView.yConstraint
getset

Gets or sets the ActionComponents.ACWebViewDragConstraint applied to the y axis of this ActionComponents.ACWebView

The y constraint.

Event Documentation

ACWebViewMovedDelegate ActionComponents.ACWebView.Moved
ACWebViewReleasedDelegate ActionComponents.ACWebView.Released
ACWebViewTouchedDelegate ActionComponents.ACWebView.Touched