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

B4AGalleryView

Written by Giuseppe Salvi

List of types:

PhotoGallery

PhotoGallery


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

Permissions:

android.permission.WRITE_EXTERNAL_STORAGE

Events:

ItemClick(Position As Int, Value As Object)
ItemLongClick(Position As Int, Value As Object)
ItemSelected(Position As Int, Value As Object)

Members:


  AddImage (Dir As String, FileName As String)

  AddImageAt (index As Int, Dir As String, FileName As String)

  Background As android.graphics.drawable.Drawable

  BringToFront

  ClearCache

  Color As Int [write only]

  CreateCache As String [write only]

  Enabled As Boolean

  FadingEdgeLength As Int [write only]

  GetImageListFromAssets (path As String) As java.util.List

  GetItem (position As Int) As String

  Gravity As Int [write only]

  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)

  isFromAssets As Boolean [read only]

  IsInitialized As Boolean

  ItemHeight As Int

  ItemWidth As Int

  Left As Int

  Length As Int [read only]

  PopulateGallery (dir As String, path As String)

  PopulateGalleryFromAssets (path As String)

  RemoveAt As Int [write only]

  RemoveView

  RequestFocus As Boolean

  Selection As Int [write only]

  SendToBack

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

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

  ShowText As Boolean

  Spacing As Int [write only]

  Tag As Object

  TextColor As Int

  TextSize As Int

  Top As Int

  Version As String [read only]

  Visible As Boolean

  Width As Int

Members description:

AddImage (Dir As String, FileName As String)
Add an image at the end of the PhotoFlow from sdcard or AssetsDir

Example:

PhotoFlow.AddImage(File.DirRootExternal,"a.jpg")
AddImageAt (index As Int, Dir As String, FileName As String)
Add an image to the desired position in the PhotoFlow from sdcard or AssetsDir

Example:

PhotoFlow.AddImage(1,File.DirRootExternal,"a.jpg")
Background As android.graphics.drawable.Drawable
BringToFront
ClearCache
Delete entire disk and memory cache created before
Color As Int [write only]
CreateCache As String [write only]
Will create a cache in "Android/data/Your cache name/cache/.thumbs" in to SdCard

Examples:

g.CreateCache = "Your cache Name Here")
Enabled As Boolean
FadingEdgeLength As Int [write only]
Set the size of the faded edge used to indicate that more content in this view is available.
GetImageListFromAssets (path As String) As java.util.List
Get entire list of images stored in assets folder

Examples:
Dim lv as ListView
Dim l as list
l.Initialize
lv.Initialize("lv")

Sub Menu_Click
Activity.AddView(lv,0,0,100%x,100%y)
l = Gallery.GetImageListFromAssets("Here the Images path u've in assets")
For n = 0 To l.Size-1
lv.AddSingleLine(l.Get(n))
next
End Sub
GetItem (position As Int) As String
Returns Item

Example:

i.Bitmap=LoadBitmap("",g.GetItem(Position))
Gravity As Int [write only]
Specifies the gravity within each cell.
Height As Int
Initialize (EventName As String)
Initialize the object
Invalidate
Invalidate2 (arg0 As android.graphics.Rect)
Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
isFromAssets As Boolean [read only]
Return true is populated from assets
IsInitialized As Boolean
ItemHeight As Int
Get or Set ItemHeight
ItemWidth As Int
Get or Sets ItemWidth
Left As Int
Length As Int [read only]
Returns lenght
PopulateGallery (dir As String, path As String)
Populate Gallery from sdcard not from assets
PopulateGalleryFromAssets (path As String)
Populate Gallery from assets not from sdcard
RemoveAt As Int [write only]
Removes the item at the specified location from this list.
RemoveView
RequestFocus As Boolean
Selection As Int [write only]
Jump directly to a specific item in the adapter data.
SendToBack
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
ShowText As Boolean
Get or Sets the visibility of the text - by default is hide
Spacing As Int [write only]
Sets the spacing between items in a Gallery
Tag As Object
TextColor As Int
Get or Sets Text Color - by default is White
TextSize As Int
Get or Sets Text size
Top As Int
Version As String [read only]
Return Author and Version of this library
Visible As Boolean
Width As Int

Top