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

ActionComponents.ACSlider is a custom slider control designed to operate like the brightness and contrast sliders built into the iPhone Control Center. The FillPercent property gets or sets the percentage that the slider is filled (from 0% to 100%). If the user taps of drags in the control (from top to bottom) the FillPercent will be adjusted accordingly and the ValueChanged,Touched, Moved, and/or Released events will be raised. More...

Inheritance diagram for ActionComponents.ACSlider:
Collaboration diagram for ActionComponents.ACSlider:

Public Member Functions

 ACSlider (Context context)
 Initializes a new instance of the ActionComponents.ACSlider class. More...
 
 ACSlider (Context context, IAttributeSet attr)
 Initializes a new instance of the ActionComponents.ACSlider class. More...
 
 ACSlider (IntPtr javaReference, JniHandleOwnership transfer)
 Initializes a new instance of the ActionComponents.ACSlider class. More...
 
 ACSlider (Context context, IAttributeSet attr, int defStyle)
 Initializes a new instance of the ActionComponents.ACSlider class. More...
 
void Redraw ()
 Redraw this ActionComponents.ACOval. More...
 
override bool OnTouchEvent (MotionEvent e)
 Raises the touch event event. More...
 
delegate void ACSliderTouchedDelegate (ACSlider view)
 Occurs when this ActionComponents.ACSlider is touched. More...
 
delegate void ACSliderMovedDelegate (ACSlider view)
 Occurs when this ActionComponents.ACSlider is moved. More...
 
delegate void ACSliderReleasedDelegate (ACSlider view)
 Occurs when this ActionComponents.ACSlider is released. More...
 
delegate void ACSliderValueChanged (int fillPercent)
 Occurs when this ActionComponents.ACSlider value changes. More...
 
- Public Member Functions inherited from ActionComponents.ACView
 ACView (Context context)
 Initializes a new instance of the ActionComponents.ACView class. More...
 
 ACView (Context context, IAttributeSet attr)
 Initializes a new instance of the ActionComponents.ACView class. More...
 
 ACView (IntPtr javaReference, JniHandleOwnership transfer)
 Initializes a new instance of the ActionComponents.ACView class. More...
 
 ACView (Context context, IAttributeSet attr, int defStyle)
 Initializes a new instance of the ActionComponents.ACView class. More...
 
void MoveToPoint (int x, int y)
 Moves this ActionComponents.ACView to the given point and honors any ActionComponents.ACViewDragConstraints applied to the X or Y axis More...
 
void MoveToPoint (Point point)
 Moves this ActionComponents.ACView 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.ACView 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.ACView More...
 
bool PointInside (Point pt)
 Test to see if the given point is inside this ActionComponents.ACView More...
 
void Purge (bool forceGarbageCollection)
 The Purge command causes this ActionComponents.ACView 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.ACView or ActionComponents.ACImageView subviews attached to this ActionComponents.ACView More...
 
override bool OnTouchEvent (MotionEvent e)
 Raises the touch event event. More...
 
delegate void ACViewTouchedDelegate (ACView view)
 Occurs when this ActionComponents.ACView is touched More...
 
delegate void ACViewMovedDelegate (ACView view)
 Occurs when this ActionComponents.ACView is moved More...
 
delegate void ACViewReleasedDelegate (ACView view)
 Occurs when this ActionComponents.ACView is released More...
 

Protected Member Functions

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

Properties

float FillPercent [get, set]
 Gets or sets the fill percent from 0% to 100%. More...
 
Color BorderColor [get, set]
 Gets or sets the color of the border. More...
 
Color BodyColor [get, set]
 Gets or sets the color of the body. More...
 
Color FillColor [get, set]
 Gets or sets the color of the fill. More...
 
Bitmap Icon [get, set]
 Gets or sets the optional icon displayed at the bottom of the control. More...
 
- Properties inherited from ActionComponents.ACView
Object tag [get, set]
 Gets or sets the [OPTIONAL] tag that can be assosciated with this ActionComponents.ACView More...
 
bool draggable [get, set]
 Gets or sets a value indicating whether this ActionComponents.ACView is draggable. More...
 
bool dragging [get]
 Gets a value indicating whether this ActionComponents.ACView is being dragged by the user. More...
 
bool bringToFrontOnTouched [get, set]
 Gets or sets a value indicating whether this ActionComponents.ACView 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.ACView More...
 
ACViewDragConstraint yConstraint [get, set]
 Gets or sets the ActionComponents.ACViewDragConstraint applied to the y axis of this ActionComponents.ACView 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

ACSliderTouchedDelegate Touched
 
ACSliderMovedDelegate Moved
 
ACSliderReleasedDelegate Released
 
ACSliderValueChanged ValueChanged
 
- Events inherited from ActionComponents.ACView
ACViewTouchedDelegate Touched
 
ACViewMovedDelegate Moved
 
ACViewReleasedDelegate Released
 

Additional Inherited Members

- Static Public Member Functions inherited from ActionComponents.ACView
static Display DefaultDisplay (View view)
 Gets the default display for the given view More...
 
static Rect WindowVisibleDisplayFrame (View view)
 Gets the window visible display frame for the given view. More...
 
static int StatusBarHeight (View view)
 Gets the status bar height for the given view. More...
 
static int ActionBarHeight (View view)
 Gets the height of the action bar for a view. More...
 
static int NavigationBarHeight (View view)
 Gets the navigation bar height for the given view. More...
 
static int DefaultDisplayHeight (View view)
 Returns the height of the default display for the given view. More...
 
static int DefaultDisplayWidth (View view)
 Returns the width for the default display for the given view. More...
 
static int GetViewHeight (View view)
 Decodes the LayoutParameters for the given View and returns the Height property More...
 
static void SetViewHeight (View view, int height)
 Decodes the LayoutParameters for the given View and sets the Height property More...
 
static int GetViewWidth (View view)
 Decodes the LayoutParameters for the given View and returns the Width property More...
 
static void SetViewWidth (View view, int Width)
 Decodes the LayoutParameters for the given View and sets the Width property More...
 
static int GetViewLeftMargin (View view)
 Decodes the LayoutParameters for the given View and returns the LeftMargin property More...
 
static void SetViewLeftMargin (View view, int LeftMargin)
 Decodes the LayoutParameters for the given View and sets the LeftMargin property More...
 
static int GetViewRightMargin (View view)
 Decodes the LayoutParameters for the given View and returns the RightMargin property More...
 
static void SetViewRightMargin (View view, int RightMargin)
 Decodes the LayoutParameters for the given View and sets the RightMargin property More...
 
static int GetViewTopMargin (View view)
 Decodes the LayoutParameters for the given View and returns the TopMargin property More...
 
static void SetViewTopMargin (View view, int TopMargin)
 Decodes the LayoutParameters for the given View and sets the TopMargin property More...
 
static int GetViewBottomMargin (View view)
 Decodes the LayoutParameters for the given View and returns the BottomMargin property More...
 
static void SetViewBottomMargin (View view, int BottomMargin)
 Decodes the LayoutParameters for the given View and sets the BottomMargin property More...
 

Detailed Description

ActionComponents.ACSlider is a custom slider control designed to operate like the brightness and contrast sliders built into the iPhone Control Center. The FillPercent property gets or sets the percentage that the slider is filled (from 0% to 100%). If the user taps of drags in the control (from top to bottom) the FillPercent will be adjusted accordingly and the ValueChanged,Touched, Moved, and/or Released events will be raised.

The ActionComponents.ACSlider is designed to be drawn vertically and the minimum width should not be less than 50 pixels.

Constructor & Destructor Documentation

ActionComponents.ACSlider.ACSlider ( Context  context)

Initializes a new instance of the ActionComponents.ACSlider class.

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

Initializes a new instance of the ActionComponents.ACSlider class.

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

Initializes a new instance of the ActionComponents.ACSlider class.

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

Initializes a new instance of the ActionComponents.ACSlider class.

Parameters
contextContext.
attrAttr.
defStyleDef style.

Member Function Documentation

delegate void ActionComponents.ACSlider.ACSliderMovedDelegate ( ACSlider  view)

Occurs when this ActionComponents.ACSlider is moved.

delegate void ActionComponents.ACSlider.ACSliderReleasedDelegate ( ACSlider  view)

Occurs when this ActionComponents.ACSlider is released.

delegate void ActionComponents.ACSlider.ACSliderTouchedDelegate ( ACSlider  view)

Occurs when this ActionComponents.ACSlider is touched.

Here is the caller graph for this function:

delegate void ActionComponents.ACSlider.ACSliderValueChanged ( int  fillPercent)

Occurs when this ActionComponents.ACSlider value changes.

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

Raises the draw event.

<Docs>the canvas on which the background will be drawn</Docs>

Implement this to do your drawing.

<format type="text/html">[Android Documentation]</format> <since version="Added in API level 1"></since>

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

Raises the touch event event.

Parameters
eE.

Here is the call graph for this function:

void ActionComponents.ACSlider.Redraw ( )

Property Documentation

Color ActionComponents.ACSlider.BodyColor
getset

Gets or sets the color of the body.

The color of the body.

Color ActionComponents.ACSlider.BorderColor
getset

Gets or sets the color of the border.

The color of the border.

Color ActionComponents.ACSlider.FillColor
getset

Gets or sets the color of the fill.

The color of the fill.

float ActionComponents.ACSlider.FillPercent
getset

Gets or sets the fill percent from 0% to 100%.

The fill percent.

Bitmap ActionComponents.ACSlider.Icon
getset

Gets or sets the optional icon displayed at the bottom of the control.

The icon.

Event Documentation

ACSliderMovedDelegate ActionComponents.ACSlider.Moved
ACSliderReleasedDelegate ActionComponents.ACSlider.Released
ACSliderTouchedDelegate ActionComponents.ACSlider.Touched
ACSliderValueChanged ActionComponents.ACSlider.ValueChanged