B4A Library [Lib] CoverFlow v2.0

M.LAZ

Active Member
Licensed User
Longtime User
ciao lonleystar
can i add a label under every picture as a title . ,, i mean every pic has a title (titolo)
grazie a te
 

lonleystar

Well-Known Member
Licensed User
Longtime User
hi luke2012, the problem is in to the class ActionDrawer.

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")
  
    'ACTION DRAWER
OverflowItems.Initialize
OverflowItems.Add("item1")
OverflowItems.Add("item2")
*************************************************************************************************************

'AD.Initialize("", "icon.png", True, Colors.RGB(100,100,100), "Dark", True, True, True, OverflowItems, "Drawer", Activity, Main)
'AD.AddAction("WhatsApp", "WhatsApp_Click", "whatsapp.png")

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

WhatsApp_Click

End Sub

so it works let me know.
 

luke2012

Well-Known Member
Licensed User
Longtime User

Problem solved!
The problem was that the image files extention was missing (pic instead of pic.jpg)
 

luke2012

Well-Known Member
Licensed User
Longtime User
@lonleystar My compliment for this library!
It's possible to have a name on the top of the image (I donate for this ?
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Guys, Coverflow is updated to v1.60.

Add:

ShowText = True - if u want to show the text by default is hide

TextColor = Colors.Yellow - change the color to the text by default is white

TextSize = 20 - change the color to the text by default is white

Carousel = True - this work only with InitializeCoverFlow as no effect with InitializeCarousel

Reverse = True - this work only with InitializeCarousel as no effect InitializeCoverFlow fixed

n.b.

if u use Selection it´ll be at the end Example:


B4X:
Sub Activity_Create(FirstTime As Boolean)

    Coverflow.InitializeCoverflow("Coverflow")
    Activity.AddView(Coverflow, 0dip, 0dip, 100%x, 100%y)
    Coverflow.Spacing= -30
    Coverflow.ItemWidth = 300dip
    Coverflow.ItemHeight = 400dip
    Coverflow.AnimationDuration=800
    Coverflow.PopulateCoverflow(File.DirRootExternal, "Images2")
    Activity.Title = "G.Salvi -- Items in Coverflow = " & Coverflow.Length
    Coverflow.ShowText = True
    Coverflow.TextColor = Colors.White
    Coverflow.TextSize = 20
    'Coverflow.Carousel = True
    'Coverflow.Reverse = True
   
    '***************************
    Coverflow.Selection = 3
    '***************************

End Sub
 

luke2012

Well-Known Member
Licensed User
Longtime User

Very good work!
Only a question : how to set the text that I want to show above the images ?
 

luke2012

Well-Known Member
Licensed User
Longtime User
Hi luke, wich text u mean? u want use your on text manually? let me know. Thx for the donation

quale testo ti riferisci ? vuoi inserire un testo da te scelto manualmente? fammi sapere. Grazie per la donazione.


Mi riferisco al testo che vedo sopra le immagini.

Da dove lo prende? Dal nome del file ?

P.S.
ho inserito nel mio codice attuale :

Coverflow.ShowText = True
Coverflow.TextColor = Colors.White
Coverflow.TextSize = 20
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi luke, yes it display the name of the images, when u set ( Coverflow.ShowText = True ) it will display the text,
by default ShowText = false mean the text hide

If u use the Coverflow.Selection use it at the last of the code that's all.

Ciao luke, si visualizza il nome delle immagini, quando setti ( Coverflow.ShowText = True ) visualizza il testo, di default ShowText = false significa che il testo non viene visualizzato, questo è tutto.

Se usi il comando Coverflow.Selection usalo sempre alla fine del codice come nell'esempio sopra, questo è tutto.
 

luke2012

Well-Known Member
Licensed User
Longtime User

Ciao prima di tutto grazie per la risposta.
Ho provato come da tue indicazioni ma vedo solo le immagini.
Forse sbaglio qualcosa io ? C'è qualche vincolo sul formato file o altro ?
 

luke2012

Well-Known Member
Licensed User
Longtime User
Hi @lonleystar.

Hi confirm that the text is displayed above the images but I have a problem with some file names.

Ciao @LonelyStar.
Ti confermo che il testo si vede come da tue indicazioni (Grazie).
Ho però un problema con alcuni nomi file visualizzati.

Esempio :

1) nome file : "Affettati_misti.jpg"
testo visualizzato : "Affett ti_misti"
2) nome file : "Anguille_marinate_di_Oristano.jpg"
testo visualizzato : "Anguille_m rinate_di_Oristano"
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…