B4A Library [Lib] CoverFlow v2.0

Hi guys, as I have promised, CoverFlow is here.

Download the Coverflow.zip

The zip contains the library and an example that´s all


The CoverFlow Class = Neil Davies




B4ACoverFlow
Author:
Giuseppe Salvi
Version: 2
  • PhotoFlow
    Events:
    • ItemClick (Position As Int, Value As Object)
    • ItemLongClick (Position As Int, Value As Object)
    • ItemSelected (Position As Int, Value As Object)
    Methods:
    • 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")
    • BringToFront
    • ClearCache
      Delete entire disk and memory cache created before
    • GetImageListFromAssets (path As String) As 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 = Coverflow.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("",PhotoFlow.GetItem(Position))
    • InitializeCarousel (EventName As String)
      Initialize the Carousel
    • InitializeCoverflow (EventName As String)
      Initialize the PhotoFlow
    • IsInitialized As Boolean
    • PopulatePhotoFlow (dir As String, path As String)
      Populate PhotoFlow from sdcard not from assets
    • PopulatePhotoFlowFromAssets (path As String)
      Populate CoverFlow from assets not from sdcard
    • RemoveView
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    Permissions:
    • android.permission.WRITE_EXTERNAL_STORAGE
    Properties:
    • AnimationDuration As Int [write only]
      Sets how long the transition animation should run when a child view changes position.
    • Carousel As Boolean [write only]
      Set as Carousel
    • Color As Int [write only]
    • CreateCache As String [write only]
      Sets the name of your own cache
      Examples:
      PhotoFlow.CreateCache = "Your cache Name Here")
      It'll create a cache in "Android/data/Your cache name/cache/.thumbs" in to SdCard
    • 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.
    • Height As Int
    • ItemHeight As Int
      Get or Set ItemHeight
    • ItemWidth As Int
      Get or Sets ItemWidth
    • Left As Int
    • Length As Int [read only]
      Returns lenght
    • Reverse As Boolean [write only]
      Set reverse
    • Selection As Int [write only]
      Jump directly to a specific item in the adapter data.
    • 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
 

Attachments

  • coverflow.jpg
    coverflow.jpg
    83.8 KB · Views: 2,378
  • coverflow2.jpg
    coverflow2.jpg
    81.1 KB · Views: 2,176
  • CoverFlow with Text.jpg
    CoverFlow with Text.jpg
    115.6 KB · Views: 1,590
  • B4ACoverFlow v.1.70.zip
    36.2 KB · Views: 463
  • B4ACoverFlow v.1.80.zip
    40.2 KB · Views: 464
  • B4ACoverFlow v2.0 fix.zip
    40.6 KB · Views: 1,073
Last edited:

rboeck

Well-Known Member
Licensed User
Longtime User
Hi lonelystar,

first of all many thanks for this very usefull library; i integrated it in my next app in few minutes.
But what i am looking for is, how to use Setlayout; i have tried out, but can you explain how to use. My second question or wish: on my tablet the shadowing effect is a little to strong and also uses 30 % of the height of the original picture. Is there a possibility to reduce the size or the brightness of this effect?
Greetings from austria
Reinhard
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi lonelystar,

first of all many thanks for this very usefull library; i integrated it in my next app in few minutes.
But what i am looking for is, how to use Setlayout; i have tried out, but can you explain how to use. My second question or wish: on my tablet the shadowing effect is a little to strong and also uses 30 % of the height of the original picture. Is there a possibility to reduce the size or the brightness of this effect?
Greetings from austria
Reinhard
hi rboeck, thanks to you to choosen it.

For first question I think u have to use for example:

Coverflow.SetLayout(0,100,500,200)

for the second question post a picture so I can understand better.
 

rboeck

Well-Known Member
Licensed User
Longtime User
Screenshot_2013-03-26-16-50-23.jpg

Hi,

my problems: i did not find the right parameters, to place the pictures in such style, that the ratio is correct. In this picture everything is more wide than in reality and the user has problems to see, where the picture ends and the shadow effect begins. Maybe this would be better, if the shadow would be darker..
I placed the picture on dropbox with this link:
https://www.dropbox.com/s/3g94itw4cbe8vlt/Screenshot_2013-03-26-16-50-23.jpg

Greetings
Reinhard
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Screenshot_2013-03-26-16-50-23.jpg

Hi,

my problems: i did not find the right parameters, to place the pictures in such style, that the ratio is correct. In this picture everything is more wide than in reality and the user has problems to see, where the picture ends and the shadow effect begins. Maybe this would be better, if the shadow would be darker..
I placed the picture on dropbox with this link:
https://www.dropbox.com/s/3g94itw4cbe8vlt/Screenshot_2013-03-26-16-50-23.jpg

Greetings
Reinhard
Hi Reinhard,
meinst du das spiegeleffekt am boden den Bildes? wenn ja , das soll so sain.Aber ich werde ein kontrol hinzufügen, wo man es benutzen kann oder auch nicht.
 

rboeck

Well-Known Member
Licensed User
Longtime User
Genau, der Eindruck des Spiegelbildes ist bei mir zu intensiv, so dass es schon etwas zu einer Verwirrung führen könnte. Eine Abdunkelung oder Verkleinerung könnte auch das Problem lösen.
Die Proportionen des Bildes kann ich auch irgendwie beeinflussen?

Reinhard
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Genau, der Eindruck des Spiegelbildes ist bei mir zu intensiv, so dass es schon etwas zu einer Verwirrung führen könnte. Eine Abdunkelung oder Verkleinerung könnte auch das Problem lösen.
Die Proportionen des Bildes kann ich auch irgendwie beeinflussen?

Reinhard
Das mit dem Spiegelbild werde ich aendern. wegen proportionen kannst du mir deinen code senden? ich will was schauen.
-sorry fuer meine deutsch. Ich lerne seit 4 Monaten erst deutsch.

download the fixed library.
 
Last edited:

rboeck

Well-Known Member
Licensed User
Longtime User
Es ist ein nur leicht verändertes, an ein Fullscreen Tablet angepasstes Programm.
 

Attachments

  • Coverflow_rb.zip
    10.1 KB · Views: 196

rboeck

Well-Known Member
Licensed User
Longtime User
Sorry for the understanding problems; i will try to translate the conversation to english.

#24 Do you mean the mirroring at the bottom of the picture? If yes, it is planned in this manner. But i will add a control to switch this on or off.

#25 Exactly, but for me the mirroring picture is to large or to bright or to intense, so the user have to look twice, where the picture stop's and the mirror effect begins. Is it possible, to set parameters to make the correct wide to heigth relation of the photos.

#26 I will change the mirroring effect. For the proportion of the pictures can you send me your code? Sorry for my german, i only learn german for four month.

#27 Its the originial coverflow program, only in fullscreen mode an adapted for tablet size.

Hope, this helps! Your german is much, much better than my french.
Greetings
Reinhard
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Thank you for the translation.
Hi Informatix, Sorry if we wrote in Deutsch, since I now live in Germany and are now four months of intensive course, and for me it is a way to practice.

now I'm mixing three languages Italian, English, and Deutsch.

I have a little problem when i try to put my donation button in the signature doesnt display nothing ,I don't know where I'm wrong please can help me to write a little guide so i can put my own donation button in my signature?
This help will be appreciated. Thanks in advance.
 
Last edited:

susu

Well-Known Member
Licensed User
Longtime User
Hi Salvi,
Could you please share your FileManager, AppInstalled, ColorPicher libraries?
Of course, I'll donate for your great work :D
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Salvi,
Could you please share your FileManager, AppInstalled, ColorPicher libraries?
Of course, I'll donate for your great work :D
Hi susu, ofcours tomorrow i´ll put it in the forum.

In it you can customize with your own icons, just respecting the names and of icons otherwise you'll get a file not found error, the size of the icons must be 64 x 64 ,that´s all.
 

Stulish

Active Member
Licensed User
Longtime User
Hi i have just had a look at coverflow and it looks awesome, the only thing i did notice is that when you slightly move the center picture the side ones seem to jump around (this is on a Galaxy S3).

But appart from that small thing its really nice looking :)

A+
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi i have just had a look at coverflow and it looks awesome, the only thing i did notice is that when you slightly move the center picture the side ones seem to jump around (this is on a Galaxy S3).

But appart from that small thing its really nice looking :)

A+
Hi Stulish,it doesnt jump arround is an animation. Thanks for A+
 
Top