#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
' #Extends: android.support.v7.app.AppCompatActivity
' #AdditionalRes: D:\Android\SDK\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
#End Region
#AdditionalRes: ..\LibRes
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private carusel As CarouselView
Dim blist As List
Dim bm As Bitmap
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
blist.Initialize 'initialize an empty list
' blist.Add(bm) 'add the image to the list
bm.Initialize(File.DirAssets, "Animal_Path_2.PNG.png")
blist.Add(bm)
bm.Initialize(File.DirAssets, "madara.jpg")
blist.Add(bm)
bm.Initialize(File.DirAssets, "UlquiorraCifer.png")
blist.Add(bm)
carusel.ImageBitmaps = blist 'pass the list with images to the library
carusel.Radius = 10 'the radius of the indicator circles
carusel.StrokeColor = Colors.Magenta 'the outline color of the circles
carusel.StrokeWidth = 5 'the width of the outline circles
carusel.FillColor = Colors.White 'the color to fill the circles with - active page/image
carusel.AutoPlay = True 'play automatically?
carusel.CurrentItem = 0 'set the indeks of where to initially start from: 0 to (number of image - 1)
carusel.DisableAutoPlayOnUserInteraction = True 'stop auto play if image is touched during autoplay
carusel.Orientation = carusel.ORIENTATION_HORIZONTAL 'can also be ORIENTATION_VERTICAL in which case it will be position to the left of the CarouselView
carusel.PageCount = blist.Size 'the number of pages/images to display
carusel.PageColor = Colors.Transparent 'the color in the centre of the indicator circles for "not active" pages
carusel.SlideInterval = 1000 'the slide interval in milli seconds
carusel.playCarousel
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub