B4A Library [Lib] CoverFlow v2.0

DSD

Member
Licensed User
Longtime User
HI DSD, i test it now like u show in post above work fine.

Thanks for helping me.
When testing my code, did you load images from File.DirAssets?
Are there any restrictions on image format?
I'm using jpegs...
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Thanks for helping me.
When testing my code, did you load images from File.DirAssets?
Are there any restrictions on image format?
I'm using jpegs...


no restriction i use jpg too the ext. below.


".jpg",".jpeg",".jpe",".jfif",".png",".bmp",".dib",".gif",".peg",".tif",".tiff",".mpf",".ppf"
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi guys, B4ACoverFlow is Update to v2.0.

What's new:

PopulatePhotoFlowFromAssets, GetImageListFromAssets.

Example:

B4X:
Coverflow.PopulatePhotoFlowFromAssets( "Images" ) - Images is a folder


B4X:
Sub Menu_Click

  Activity.AddView( lv, 0, 0, 100%x, 100%y )

  l = Coverflow.GetImageListFromAssets( "Images" ) - Images is a folder

  For n = 0 To l.Size-1   

     lv.AddSingleLine ( l.Get(n) )

  Next

End Sub

Coverflow.AddImage,Coverflow.AddImageAt Work better now.
inide the zip is a new lib v2.0 and demo
 

DSD

Member
Licensed User
Longtime User
Hi guys, B4ACoverFlow is Update to v2.0.

What's new:

PopulatePhotoFlowFromAssets, GetImageListFromAssets.

Coverflow.AddImage,Coverflow.AddImageAt Work better now.
inide the zip is a new lib v2.0 and demo

Thanks for adding this, I'm now able to use the coverflow, great work!
The images are scaled wrong (for me), although I've set the ItemWidth and ItemHeight to the correct height and width of the images (they are all of the same height and width). Do I need to compensate for something when setting the height and width in order to get the pictures to the correct aspect?

The height is 260 and width is 186, but the sample app show each item having heigth 390 and width 279. I've tried setting the ItemHeight and ItemWidth before and after adding images, but it does not seem to work.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi dsd and all the lib is fixed as dsd as reported.

p.s
For the correct ItemWidth and ItemHeight use this way below.

ItemWidth = 186, ItemHeight = 260 instead of ItemWidth = 186dip, ItemHeight = 260dip or ItemWidth = 30%x and ItemHeight = 40%y

Another problem fixed is when you wanted to display images from assets it gave the error file not found now it work, below is the example.

B4X:
Sub Coverflow_ItemClick(Position As Int, Value As Object)

below when you want to to display the image from sdcard.

Coverflow.SetBackgroundImage(LoadBitmapSample("",Value,600,1024))

*****************************************************

below when you want to to display the image from assets.

Coverflow.SetBackgroundImage(Value)

End Sub

Sorry for the inconvenience.



 
Last edited:
Reactions: DSD

DSD

Member
Licensed User
Longtime User
Thanks Lonleystar for fixing this.

I've given you a donation of 10 Euros for all your help and work.
 

IlCasti

Active Member
Licensed User
Longtime User
Hi lonleystar
Great Lib!
But..
...How can i change tilt in carousel?
In your attached pictures i see that there are different tilt..
Thanks to explain method

Bye
IlCasti
 

IlCasti

Active Member
Licensed User
Longtime User
Image in carousel are not flat but has tilt
In that three attachments the different images are tilted in different way
How can i do different angle? It dipende by spacing values?
Thanks
PS: if u dont understand i show u some example

Le immagini non sono piatte ma inclinate
Nelle tre immagini allegate queste sono inclinate in modo diverso
Come posso mettere un angolo diverso? Dipende dalla spaziatura?
Grazie
Ps: se non capisci ti mostro degli esempi

Ciao



https://www.dropbox.com/s/dx11ard5mw2mwvj/CoverFlowTiltImage.png
 

IlCasti

Active Member
Licensed User
Longtime User
Hi Giuseppe
Thank you
I solved this afternoon with the spacing of elements and their width
But... if you wanted, in the future, to implement the gradation of elements, the forum would be grateful to you

Now i go on to test your lib in my app ;-)
Bye
 

Mrjoey

Active Member
Licensed User
Longtime User
Hello , gd work man , it seems a beautiful library , i didnt tested it yet but i saw all the functions and properties in the 1st post and i would like to ask u if u make a new function to displays images from loaded bitmaps i mean like coverflow.addbitmap(bmp as bitmap) it would really help me for my music app so i can display the song covers , i hope u consider my wish in the next update , and i appreciate ur hard work , thank u
 

Mrjoey

Active Member
Licensed User
Longtime User
10x for ur reply , i mean instead of addimage(dir , filename) it would be addimage(bmp as bitmap) 10x dear
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…