![]() |
ActionComponents
04.05.00
Customizable UI and time-saving tools for Android development with Xamarin and Visual Studio.
|
The ActionComponents.ACImageView is a custom ImageView
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 image loading, scaling and rotation. The ActionComponents.ACImageView includes a DisposeImage
method to release the memory being held by an image Bitmap
. Memory will automatically be purged before loading a new image into this ActionComponents.ACImageView.
More...
Public Member Functions | |
ACImageView (Context context) | |
Initializes a new instance of the ActionComponents.ACImageView class. More... | |
ACImageView (Context context, IAttributeSet attr) | |
Initializes a new instance of the ActionComponents.ACImageView class. More... | |
ACImageView (IntPtr javaReference, JniHandleOwnership transfer) | |
Initializes a new instance of the ActionComponents.ACImageView class. More... | |
ACImageView (Context context, IAttributeSet attr, int defStyle) | |
Initializes a new instance of the ActionComponents.ACImageView class. More... | |
void | FromBitmap (Bitmap bitmap) |
Loads the image displayed in this ActionComponents.ACImageView from the given Bitmap More... | |
void | FromFile (string filename) |
Loads the image displayed in this ActionComponents.ACImageView from the given filename More... | |
void | FromFile (string filename, int width, int height) |
Loads the image displayed in this ActionComponents.ACImageView from the given filename resampling the image to the given height/width More... | |
void | FromResource (Android.Content.Res.Resources resources, int resourceID) |
Loads the image being displayed by this ActionComponents.ACImageView from the given resources and resource ID More... | |
void | FromResource (Android.Content.Res.Resources resources, int resourceID, int width, int height) |
Loads the image being displayed by this ActionComponents.ACImageView from the given resources and resource ID resampling the image to the given height/width More... | |
void | DisposeImage () |
Forces this ActionComponents.ACImageView to release all of the memory being held by the Bitmap image it is displaying More... | |
void | MoveToPoint (int x, int y) |
Moves this ActionComponents.ACImageView to the given point and honors any ActionComponents.ACViewDragConstraints applied to the X or Y axis More... | |
void | MoveToPoint (Point point) |
Moves this ActionComponents.ACImageView to the given point and honors any ActionComponents.ACViewDragConstraints applied to the X or Y axis More... | |
void | Resize (int width, int height) |
Resize this ActionComponents.ACImageView to the specified width and height. More... | |
void | RotateTo (float degrees) |
Rotates the image being controlled by this ActionComponents.ACImageView to the given degrees More... | |
bool | PointInside (int x, int y) |
Test to see if the given x and y coordinates are inside this ActionComponents.ACImageView More... | |
bool | PointInside (Point pt) |
Test to see if the given point is inside this ActionComponents.ACImageView More... | |
override bool | OnTouchEvent (MotionEvent e) |
Raises the touch event event. More... | |
delegate void | ACImageViewTouchedDelegate (ACImageView view) |
Occurs when this ActionComponents.ACImageView is touched More... | |
delegate void | ACImageViewMovedDelegate (ACImageView view) |
Occurs when this ActionComponents.ACImageView is moved More... | |
delegate void | ACImageViewReleasedDelegate (ACImageView view) |
Occurs when this ActionComponents.ACImageView is released More... | |
Properties | |
Object | tag [get, set] |
Gets or sets the [OPTIONAL] tag that can be assosciated with this ActionComponents.ACImageView More... | |
bool | draggable [get, set] |
Gets or sets a value indicating whether this ActionComponents.ACImageView is draggable. More... | |
bool | dragging [get] |
Gets a value indicating whether this ActionComponents.ACImageView is being dragged by the user. More... | |
bool | bringToFrontOnTouched [get, set] |
Gets or sets a value indicating whether this ActionComponents.ACImageView is automatically brought to the front when touched. More... | |
ACViewDragConstraint | xConstraint [get, set] |
Gets or sets the ActionComponents.ACViewDragConstraint applied to the x axis of this ActionComponents.ACImageView More... | |
ACViewDragConstraint | yConstraint [get, set] |
Gets or sets the ActionComponents.ACViewDragConstraint applied to the y axis of this ActionComponents.ACImageView 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 | |
ACImageViewTouchedDelegate | Touched |
ACImageViewMovedDelegate | Moved |
ACImageViewReleasedDelegate | Released |
The ActionComponents.ACImageView is a custom ImageView
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 image loading, scaling and rotation. The ActionComponents.ACImageView includes a DisposeImage
method to release the memory being held by an image Bitmap
. Memory will automatically be purged before loading a new image into this ActionComponents.ACImageView.
Notice!: The ActionComponents.ACImageView works best hosted inside of a RelativeLayout
. Available in ActionPack Business or Enterprise only.
ActionComponents.ACImageView.ACImageView | ( | Context | context | ) |
Initializes a new instance of the ActionComponents.ACImageView class.
context | Context. |
ActionComponents.ACImageView.ACImageView | ( | Context | context, |
IAttributeSet | attr | ||
) |
Initializes a new instance of the ActionComponents.ACImageView class.
context | Context. |
attr | Attr. |
ActionComponents.ACImageView.ACImageView | ( | IntPtr | javaReference, |
JniHandleOwnership | transfer | ||
) |
Initializes a new instance of the ActionComponents.ACImageView class.
javaReference | Java reference. |
transfer | Transfer. |
ActionComponents.ACImageView.ACImageView | ( | Context | context, |
IAttributeSet | attr, | ||
int | defStyle | ||
) |
Initializes a new instance of the ActionComponents.ACImageView class.
context | Context. |
attr | Attr. |
defStyle | Def style. |
delegate void ActionComponents.ACImageView.ACImageViewMovedDelegate | ( | ACImageView | view | ) |
Occurs when this ActionComponents.ACImageView is moved
delegate void ActionComponents.ACImageView.ACImageViewReleasedDelegate | ( | ACImageView | view | ) |
Occurs when this ActionComponents.ACImageView is released
delegate void ActionComponents.ACImageView.ACImageViewTouchedDelegate | ( | ACImageView | view | ) |
Occurs when this ActionComponents.ACImageView is touched
void ActionComponents.ACImageView.DisposeImage | ( | ) |
Forces this ActionComponents.ACImageView to release all of the memory being held by the Bitmap
image it is displaying
void ActionComponents.ACImageView.FromBitmap | ( | Bitmap | bitmap | ) |
Loads the image displayed in this ActionComponents.ACImageView from the given Bitmap
bitmap | Bitmap. |
If this ActionComponents.ACImageView already has an image loaded, it will be purged from memory before the new image is loaded
void ActionComponents.ACImageView.FromFile | ( | string | filename | ) |
Loads the image displayed in this ActionComponents.ACImageView from the given filename
filename | Filename. |
If this ActionComponents.ACImageView already has an image loaded, it will be purged from memory before the new image is loaded
void ActionComponents.ACImageView.FromFile | ( | string | filename, |
int | width, | ||
int | height | ||
) |
Loads the image displayed in this ActionComponents.ACImageView from the given filename resampling the image to the given height/width
filename | Filename. |
width | Width. |
height | Height. |
If this ActionComponents.ACImageView already has an image loaded, it will be purged from memory before the new image is loaded
void ActionComponents.ACImageView.FromResource | ( | Android.Content.Res.Resources | resources, |
int | resourceID | ||
) |
Loads the image being displayed by this ActionComponents.ACImageView from the given resources and resource ID
resources | Resources. |
resourceID | Resource ID. |
If this ActionComponents.ACImageView already has an image loaded, it will be purged from memory before the new image is loaded
void ActionComponents.ACImageView.FromResource | ( | Android.Content.Res.Resources | resources, |
int | resourceID, | ||
int | width, | ||
int | height | ||
) |
Loads the image being displayed by this ActionComponents.ACImageView from the given resources and resource ID resampling the image to the given height/width
resources | Resources. |
resourceID | Resource ID. |
width | Width. |
height | Height. |
If this ActionComponents.ACImageView already has an image loaded, it will be purged from memory before the new image is loaded
void ActionComponents.ACImageView.MoveToPoint | ( | int | x, |
int | y | ||
) |
Moves this ActionComponents.ACImageView to the given point and honors any ActionComponents.ACViewDragConstraints applied to the X
or Y
axis
x | The x coordinate. |
y | The y coordinate. |
void ActionComponents.ACImageView.MoveToPoint | ( | Point | point | ) |
Moves this ActionComponents.ACImageView to the given point and honors any ActionComponents.ACViewDragConstraints applied to the X
or Y
axis
pt | Point. |
override bool ActionComponents.ACImageView.OnTouchEvent | ( | MotionEvent | e | ) |
Raises the touch event event.
e | E. |
bool ActionComponents.ACImageView.PointInside | ( | int | x, |
int | y | ||
) |
Test to see if the given x and y coordinates are inside this ActionComponents.ACImageView
true
, if inside was pointed, false
otherwise.x | The x coordinate. |
y | The y coordinate. |
bool ActionComponents.ACImageView.PointInside | ( | Point | pt | ) |
Test to see if the given point is inside this ActionComponents.ACImageView
true
, if inside was pointed, false
otherwise.pt | Point. |
void ActionComponents.ACImageView.Resize | ( | int | width, |
int | height | ||
) |
Resize this ActionComponents.ACImageView to the specified width and height.
width | Width. |
height | Height. |
void ActionComponents.ACImageView.RotateTo | ( | float | degrees | ) |
Rotates the image being controlled by this ActionComponents.ACImageView to the given degrees
degrees | Degrees. |
|
getset |
Gets or sets the bottom margin.
The bottom margin.
|
getset |
Gets or sets a value indicating whether this ActionComponents.ACImageView is automatically brought to the front when touched.
true
if bring to front on touched; otherwise, false
.
|
getset |
Gets or sets a value indicating whether this ActionComponents.ACImageView is draggable.
true
if is draggable; otherwise, false
.
|
get |
Gets a value indicating whether this ActionComponents.ACImageView is being dragged by the user.
true
if dragging; otherwise, false
.
|
getset |
Gets or sets the height of the layout.
The height of the layout.
|
getset |
Gets or sets the width of the layout.
The width of the layout.
|
getset |
Gets or sets the left margin.
The left margin.
|
getset |
Gets or sets the right margin.
The right margin.
|
getset |
Gets or sets the [OPTIONAL] tag that can be assosciated with this ActionComponents.ACImageView
The tag.
|
getset |
Gets or sets the top margin.
The top margin.
|
getset |
Gets or sets the ActionComponents.ACViewDragConstraint applied to the x axis
of this ActionComponents.ACImageView
The x constraint.
|
getset |
Gets or sets the ActionComponents.ACViewDragConstraint applied to the y axis
of this ActionComponents.ACImageView
The y constraint.
ACImageViewMovedDelegate ActionComponents.ACImageView.Moved |
ACImageViewReleasedDelegate ActionComponents.ACImageView.Released |
ACImageViewTouchedDelegate ActionComponents.ACImageView.Touched |