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

B4APhotoPager

Written by Giuseppe Salvi

List of types:

PhotoPager

PhotoPager


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

Permissions:

android.permission.READ_EXTERNAL_STORAGE
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.INTERNET

Events:

Click
LongClick
PageScrollStateChanged(State As Int)
PageSelected(Position As Int)
PageScrolled(Position As Int, PositionOffset As Float, PositionOffsetPixels As Int)

Members:


  AddImage (dir As String, file As String)

  AddImageAt (index As Int, dir As String, file As String)

  AddImageFromWeb (address As String)

  AddImageFromWebAt (index As Int, address As String)

  AdjustViewBounds As Boolean

  Background As android.graphics.drawable.Drawable

  BackgroundColorRandomly As Boolean [write only]

  BringToFront

  CacheInMemory As Boolean [write only]

  CacheOnDisk As Boolean [write only]

  ClearDiskCache

  ClearMemoryCache

  Color As Int [write only]

  CompressFormat As it.giuseppe.salvi.library.core.photopager.utility.bitmap.PagerBitmaCompressionWrapper

  CompressQuality As Int

  CurrentItem As Int [write only]

  DestroyEngine

  Effect As it.giuseppe.salvi.library.core.photopager.utillity.enumeration.PagerTransitionEffects

  Enabled As Boolean

  FadeInTime As Int [write only]

  GetArrayList As java.util.List

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

  GoToPage (item As Int, smoothScroll As Boolean)

  Height As Int

  imagePagerconfig As it.giuseppe.salvi.library.pager.core.uil.ImageLoaderConfiguration

  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

  Length As Int [read only]

  OutlineColor As Int [write only]

  OutlineEnabled As Boolean [write only]

  Pause

  ProgressBarVisible As Boolean [write only]

  RemoveView

  RequestFocus As Boolean

  ResumeEngine

  ScaleType As it.giuseppe.salvi.library.core.photopager.utillity.enumeration.PagerScaleTypeWrapper

  SendToBack

  SetArrayList (array As java.util.ArrayList)

  SetBackgroundImage (arg0 As android.graphics.Bitmap)

  SetImageForEmptyUri As String [write only]

  SetImageOnFail As String [write only]

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

  ShowFromAssets (path As String, sort As Boolean)

  ShowFromMediaStore (sort As Boolean)

  ShowFromSdCard (dir As String, path As String, sort As Boolean)

  ShowFromWeb (webStrings() As String, sort As Boolean)

  StopEngine

  Tag As Object

  ToggleDoubleTap

  ToggleFade

  ToggleLock

  ToggleZoom

  Top As Int

  Version As String [read only]

  Visible As Boolean

  Width As Int

Members description:

AddImage (dir As String, file As String)
Add an image from sdcard or AssetsDir at the end of the view pager .
AddImageAt (index As Int, dir As String, file As String)
Add an image from sdcard or AssetsDir to the desired position in the view pager.
AddImageFromWeb (address As String)
Add an image from web and from Dropbox at the end of the view pager.
AddImageFromWebAt (index As Int, address As String)
Add an image from web and from Dropbox to the desired position in the view pager.
AdjustViewBounds As Boolean
Get or Sets this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
Background As android.graphics.drawable.Drawable
BackgroundColorRandomly As Boolean [write only]
Set the Background Color Randomly.
BringToFront
CacheInMemory As Boolean [write only]
Sets whether loaded image will be cached in memory - by default false.
CacheOnDisk As Boolean [write only]
Sets whether loaded image will be cached on disk - by default false.
ClearDiskCache
Clears disk cache.
ClearMemoryCache
Clears memory cache.
Color As Int [write only]
CompressFormat As it.giuseppe.salvi.library.core.photopager.utility.bitmap.PagerBitmaCompressionWrapper
Get or Sets the known formats a bitmap can be compressed into [ JPG or PNG ]
CompressQuality As Int
Get or Sets the quality of a bitmap, that can be compressed. [ 0 = low -> 100 = high ]
CurrentItem As Int [write only]
Get or Sets the currently selected page.
DestroyEngine
Stops ImageLoader and clears current configuration. Use this option on exit app.
Effect As it.giuseppe.salvi.library.core.photopager.utillity.enumeration.PagerTransitionEffects
Get or Sets transition effect.
Enabled As Boolean
FadeInTime As Int [write only]
Duration of "fade-in" animation (in milliseconds)
Whether animation should be played if image is loaded from network
Whether animation should be played if image is loaded from disk cache
Whether animation should be played if image is loaded from memory cache.
GetArrayList As java.util.List
Get an array.
GetImageListFromAssets (path As String) As java.util.List
Get entire list of images stored in assets or sub-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 = vp.GetImageListFromAssets("Here the Images folder stored in Assets")
or
l = vp.GetImageListFromAssets(File.DirAssets)
or
l = vp.GetImageListFromAssets("")
  For n = 0 To l.Size-1
    lv.AddSingleLine(l.Get(n))
  next
End Sub
GoToPage (item As Int, smoothScroll As Boolean)
Get or Sets the currently selected page.
Height As Int
imagePagerconfig As it.giuseppe.salvi.library.pager.core.uil.ImageLoaderConfiguration
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)
IsInitialized As Boolean
Left As Int
Length As Int [read only]
Returns length.
OutlineColor As Int [write only]
Set outLine color.
OutlineEnabled As Boolean [write only]
Enable or disable outLine to photo pager.
Pause
Pause ImageLoader. All new load and display tasks won't be executed until ImageLoader is resumed.
Already running tasks are not paused.
ProgressBarVisible As Boolean [write only]
Set the enabled state of this view. - by default is true.
RemoveView
RequestFocus As Boolean
ResumeEngine
Resumes waiting load and display tasks.
ScaleType As it.giuseppe.salvi.library.core.photopager.utillity.enumeration.PagerScaleTypeWrapper
Controls how the image should be resized or moved to match the size of this ImageView.

by default is Fit_Center.
SendToBack
SetArrayList (array As java.util.ArrayList)
Set an array passed from, gallery, grid view, cover flow.
SetBackgroundImage (arg0 As android.graphics.Bitmap)
SetImageForEmptyUri As String [write only]
Sets own icon on loading.
SetImageOnFail As String [write only]
Sets own icon on fail.
SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
ShowFromAssets (path As String, sort As Boolean)
show images from assets or sub-folder not from sdcard.
ShowFromMediaStore (sort As Boolean)
show images from media store.
ShowFromSdCard (dir As String, path As String, sort As Boolean)
show images from sdcard not from assets.
ShowFromWeb (webStrings() As String, sort As Boolean)
show images from web.
StopEngine
Cancels all running and scheduled display image tasks.
NOTE: This method doesn't shutdown if you set them.

ImageLoader still can be used after calling this method.
Tag As Object
Get or Sets this view's tag.
ToggleDoubleTap
Enable or disable double tap.
ToggleFade
Enable or disable fade.
ToggleLock
Lock or unlock photo pager.
ToggleZoom
Enable or disable the current image zoom.
Top As Int
Version As String [read only]
Return Author and Version of this library
Visible As Boolean
Width As Int

Top