Hi
This is my first experience with Library wrappers
Below is the wrapper for daimajia.AndroidImageSlider
from https://github.com/daimajia/AndroidImageSlider
simple to use, it is very simple features as well, I'll post here the source code for the wrapper in case someone wants to help enhancing the wrapper
to use the wrapper
1- Extract the "res" folder to your any path
2- Extract the "jar1.zip" and "jar2.zip" attachments to your android additional library folder
3- Add android-support-v4.jar to your android additional library folder
4- Create a new project
5- Goto the Libraries Manager and check AndroidSlider library
6- Add the line below to Project Attributes region
7- Add Slider object to the Globals sub
8- replace the Activity_create sub with the following code
This is my first experience with Library wrappers
Below is the wrapper for daimajia.AndroidImageSlider
from https://github.com/daimajia/AndroidImageSlider
simple to use, it is very simple features as well, I'll post here the source code for the wrapper in case someone wants to help enhancing the wrapper
to use the wrapper
1- Extract the "res" folder to your any path
2- Extract the "jar1.zip" and "jar2.zip" attachments to your android additional library folder
3- Add android-support-v4.jar to your android additional library folder
4- Create a new project
5- Goto the Libraries Manager and check AndroidSlider library
6- Add the line below to Project Attributes region
B4X:
#AdditionalRes: YOUR-RES-FOLDER-PATH, com.daimajia.slider.library
B4X:
Dim Slider As Slider
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("1")
Slider.Initialize("Slider")
Activity.AddView(Slider,0dip,0dip,100%x,100%y)
'
Slider.AddSlide("Hannibal", "http://static2.hypable.com/wp-content/uploads/2013/12/hannibal-season-2-release-date.jpg")
Slider.AddSlide("Big Bang Theory", "http://tvfiles.alphacoders.com/100/hdclearart-10.png")
Slider.AddSlide("House of Cards", "http://cdn3.nflximg.net/images/3093/2043093.jpg")
Slider.AddSlide("Game of Thrones", "http://images.boomsbeat.com/data/images/full/19640/game-of-thrones-season-4-jpg.jpg")
Dim filelist As List = File.ListFiles(File.DirDefaultExternal )
For Each fi As String In filelist
Dim path As String =File.Combine(File.DirDefaultExternal , fi)
If fi.LastIndexOf (".JPG")>0 Or fi.LastIndexOf (".png")>0 Then
Slider.AddSlide(fi , "file:" & path )
End If
Next
Slider.SetTransition(Slider.SLIDER_TRANSITION_Fade)
Slider.Delay=5000
Slider.Start
End Sub