Android Programming Press on the image to return to the main documentation page.

TouchImageView

Written by Martin Pearman

List of types:

TouchImageView

TouchImageView


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

Click(X As Int, Y As Int)
LongClick(X As Int, Y As Int)

Members:


  Background As android.graphics.drawable.Drawable

  BackgroundImage As android.graphics.Bitmap

  BringToFront

  buildNativeView (arg0 As android.content.Context, arg1 As Class, arg2 As java.util.HashMap, arg3 As Boolean) As T

  ClickPeriod As Int

  Color As Int [write only]

  CreateLog

  Enabled As Boolean

  GetDestRect As RectWrapper

  Gravity As Int

  Height As Int

  Initialize (EventName As String)

  Invalidate

  Invalidate2 (arg0 As android.graphics.Rect)

  Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  IsInitialized As Boolean

  Left As Int

  MaxScale As Float

  MinScale As Float

  PreScale (Scale As Float, PointX As Int, PointY As Int)

  RemoveView

  RequestFocus As Boolean

  ScaleSrcRectToDestRect (SrcRect As android.graphics.Rect, DestRect As android.graphics.Rect, ScaleToFit As String)

  ScaleX As Float [read only]

  ScaleY As Float [read only]

  SendToBack

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

  SetBitmap (aBitmap As android.graphics.Bitmap)

  SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)

  Tag As Object

  Top As Int

  TouchEnabled As Boolean

  TranslatePadding As Int

  Visible As Boolean

  Width As Int

Members description:

Background As android.graphics.drawable.Drawable
BackgroundImage As android.graphics.Bitmap
Get or Set the BackgroundImage.
BringToFront
buildNativeView (arg0 As android.content.Context, arg1 As Class, arg2 As java.util.HashMap, arg3 As Boolean) As T
ClickPeriod As Int
Get or Set the ClickPeriod in milliseconds.
The ClickPeriod is the threshold between a click being treated as a Click or a LongClick.
The default ClickPeriod is 200 milliseconds.
Color As Int [write only]
CreateLog
Creates log entries with details about the current state of the TouchImageView.
Enabled As Boolean
GetDestRect As RectWrapper
Returns a Rect that describes the current scale and position of the image within the TouchImageView.
Gravity As Int
Get or Set the Gravity of the BackgroundImage.
Height As Int
Initialize (EventName As String)
Invalidate
Invalidate2 (arg0 As android.graphics.Rect)
Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
IsInitialized As Boolean
Left As Int
MaxScale As Float
Get or set the maximum scale that the image can be enlarged by (zoomed in).
Default MaxScale is 1.5.
MinScale As Float
Get or set the minimum scale that the image can be reduced by (zoomed out).
Default MinScale is 0.5.
PreScale (Scale As Float, PointX As Int, PointY As Int)
Change the current image scale by Scale, centering the change on (X, Y).
For example a Scale value of 1.5 will increase the current scale by 150%.
RemoveView
RequestFocus As Boolean
ScaleSrcRectToDestRect (SrcRect As android.graphics.Rect, DestRect As android.graphics.Rect, ScaleToFit As String)
Scale and position the area of the (foreground) image defined by SrcRect to the area of the TouchImageView defined by DestRect.
ScaleToFit controls how the image should be aligned in the DestRect:
CENTER - Center and maximise the image to fit the DestRect maintaining the aspect ratio.
END - Maximise the image to fit the DestRect maintaining the aspect ratio, align the image with the bottom and right edges of the DestRect.
FILL - Maximise the image to completely fill the DestRect, the aspect ratio may not be maintained.
START - Maximise the image to fit the DestRect maintaining the aspect ratio, align the image with the top and left edges of the DestRect.
ScaleX As Float [read only]
Get the factor which the image is currently scaled by on it's X axis.
ScaleY As Float [read only]
Get the factor which the image is currently scaled by on it's Y axis.
SendToBack
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetBitmap (aBitmap As android.graphics.Bitmap)
Set the (foreground) image.
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
Tag As Object
Top As Int
TouchEnabled As Boolean
Get or Set whether touch events are enabled.
TranslatePadding As Int
Get or set the minimum number of pixels that the image will always display within the TouchImageView.
Default TranslatePadding is 64 pixels.
The image can not be dragged out of visibility, at least 64 pixels of width and height will always be visible.
Visible As Boolean
Width As Int

Top