CoverFlow
CoverFlow
Events:
- ItemClick (Position As Int)
- ItemLongClick (Position As Int)
- ItemSelected (Position As Int)
- NeedBitmap (Position As Int) As Object
- NeedBitmapCount As Int
Methods:
- AddBitmap (Bmp As BitmapWrapper)
Adds a bitmap to the list.
This function is ignored if WithList = false.
- BitmapCount As Int
Returns the number of items in the bitmap list.
- BringToFront
Changes the Z order of this view and brings it to the front.
- ClearBitmapList
Clears the bitmap list.
This function is ignored if WithList = false.
- Initialize (ImageWidth As Int, ImageHeight As Int, WithList As Boolean, WithReflection As Boolean, EventName As String)
Initializes the CoverFlow view.
ImageWidth: maximum width of images.
ImageHeight: maximum height of images.
WithList: if true, all bitmaps are retrieved from a list populated with AddBitmap. If false, each bitmap is requested when needed by the NeedBitmap event (NeedBitmapCount is called before to return the number of bitmaps) and Refresh must be called to update the gallery.
WithReflection: if true, a reflection effect is added under each image.
EventName: prefix of the event handlers (myEventName_ItemClick, myEventName_ItemLongClick, myEventName_ItemSelected, myEventName_NeedBitmap).
- Invalidate
Invalidates the whole view forcing the view to redraw itself.
Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
- Invalidate2 (Rect As Rect)
Invalidates the given rectangle.
Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
- Invalidate3 (Left As Int, Top As Int, Right As Int, Bottom As Int)
Invalidates the given rectangle.
Redrawing will only happen when the program can process messages. Usually when it finishes running the current code.
- IsInitialized As Boolean
- Refresh
Updates the contents of the gallery (the bitmaps displayed).
Calls to this function are only required if WithList = false.
It cannot be called in Activity_Create and must be called at least once after Initialize.
- RemoveView
Removes this view from its parent.
- RequestFocus As Boolean
Tries to set the focus to this view.
Returns True if the focus was set.
- SendToBack
Changes the Z order of this view and sends it to the back.
- SetBackgroundImage (Bitmap As Bitmap)
- SetLayout (Left As Int, Top As Int, Width As Int, Height As Int)
Changes the view position and size.
- SetSpacing (Value As Int)
Sets the spacing between images (default = -15).
Properties:
- Background As Drawable
Gets or sets the background drawable.
- Color As Int [write only]
Sets the background of the view to be a ColorDrawable with the given color.
If the current background is of type GradientDrawable or ColorDrawable the round corners will be kept.
- Enabled As Boolean
- Height As Int
- ImageReflectionRatio As Float
Gets/sets the image reflection ratio (default = 0.3).
- Left As Int
- MaxRotationAngle As Int
Gets/sets the maximum rotation angle of each image (default = 60).
- MaxZoom As Int
Gets/sets the maximum zoom of the central image (default = -120).
- ReflectionGap As Float
Gets/sets the reflection gap.
- ReflectionIntensity As Int
Gets/sets the reflection intensity (from 0:dark to 255:bright).
- Selection As Int
Gets/sets the selected item.
- Tag As Object
Gets or sets the Tag value. This is a place holder which can used to store additional data.
- Top As Int
- Visible As Boolean
- Width As Int
Gets or sets the view's width.
Author: Frédéric Leneuf-Magaud