B4A Library [Lib, Chargeable] UltimateListView

Discussion in 'Additional libraries, classes and official updates' started by Informatix, Oct 26, 2012.

  1. Informatix

    Informatix Expert Licensed User

    Still in a bed. I'll be out probably tomorrow.
    Thanks for asking.
     
    fredo, asales and LucaMs like this.
  2. asales

    asales Well-Known Member Licensed User

    Get well!
     
    Informatix likes this.
  3. Aries Abedes

    Aries Abedes Member Licensed User

    Get well and hoping for your fast recovery :)
     
    Informatix likes this.
  4. Informatix

    Informatix Expert Licensed User

    I'm back on my feet and in a good shape. Thanks to everyone for your nice words.
     
    asales, fredo, Aries Abedes and 9 others like this.
  5. Informatix

    Informatix Expert Licensed User

    I am absent from April 21 to May 6, 2018. Please wait for my return to ask your questions or make a donation for ULV.
     
  6. ilan

    ilan Expert Licensed User

    hi, can i add this animation to ULV?



    or just scale a panel to 0 with SetLayoutAnimated

    if i try to add an animation to a panel i am getting an error.

    i know that i should not try to update the views directly and that ulv works different then clv where i need to update the list with all content and then just rebuild ulv again and call ulv.refreshcontent but how could i still do such an animation with ulv??

    thanx

     
  7. Informatix

    Informatix Expert Licensed User

    1) Support is only provided by email.
    2) Please look at the Animation and Drag&Drop examples.
     
  8. ilan

    ilan Expert Licensed User

    thank you, i am looking right now on the animation examples and my question is answered :)
     
  9. PHB2

    PHB2 Member Licensed User

    Hi Informatix

    Very keen on your library. Can I ask a couple of questions?

    Can I confirm it allows for swipe left and swipe right, with the ability to have content behind the swipped panel similar to in Mail where you can swipe left and see in green 'Archive' and when you swipe right you can see in red 'Delete' ?
    Can you long press an item and move it elsewhere in the list?
    Does it come with example code?
    Can you add Views to the item panel, e.g. could I add a button to each item that can be clicked and raise an event?

    If the answer is yes to all the above questions, you have another customer :)

    Regards

    Mark
     
  10. fredo

    fredo Active Member Licensed User

    As a ULV user since 6 years I can highly recommend this lib.
    Your questions can all be answered with "yes".
    Even the support via email is outstanding (but make sure to read and understand the docs and examples before you click "send").

    Here's a list of the examples:
    08-06-_2018_12-23-18.png
     
    johndb and Informatix like this.
  11. PHB2

    PHB2 Member Licensed User

    Thanks Fredo!
     
  12. Informatix

    Informatix Expert Licensed User

    As Fredo said, it's a big Yes.
     
    johndb and PHB2 like this.
  13. Informatix

    Informatix Expert Licensed User

    I published yesterday a library named Observable. In case anyone wonders, it is of little use to ULV. For example, it is not possible to use the Bind function of Observables because of the view recycling.
    You can write a cleaner code with it, but this can be achieved also without the library. Example:
    Code:
    Sub Item_RowContentFiller(RowID As Long, LayoutName As String, CellPanel As Panel, CellIndex As Byte, Position As Int)
       
    Select CellIndex
           
    Case 0:
               
    'Positions the cursor on the requested item
               dbCursor.Position = RowID

               
    'Retrieves the image from the database
               Dim binImage() As Byte, Flux As InputStream
               binImage = dbCursor.GetBlob(
    "Image")
               Flux.InitializeFromBytesArray(binImage, 
    0, binImage.Length)
               
    Dim Bmp As Bitmap
               Bmp.Initialize2(Flux)
               Flux.Close

               
    'Displays the bitmap
               Dim IV As ImageView = CellPanel.GetView(0)
               IV.Bitmap = Bmp
               IV.Gravity = 
    Gravity.FILL

           
    Case 1:
               
    'Displays the name
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = dbCursor.GetString(
    "Name")

           
    Case 2:
               
    'Reads the origin and sets a string for display
               Dim Origin As String
               
    If dbCursor.GetInt("Exotic") = 0 Then
                   Origin = 
    "native"
               
    Else
                   Origin = 
    "exotic"
               
    End If

               
    'Displays the origin
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = Origin

           
    Case 3:
               
    'Displays the quantity
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = dbCursor.GetInt(
    "Quantity")
       
    End Select
    End Sub
    This code could be written like this with Observables:
    Code:
    Sub Item_RowContentFiller(RowID As Long, LayoutName As String, CellPanel As Panel, CellIndex As Byte, Position As Int)
       
    Select CellIndex
           
    Case 0:
               
    'Displays the bitmap
               Dim IV As ImageView = CellPanel.GetView(0)
               IV.Bitmap = ofImage.GetValueForID(RowID)
               IV.Gravity = 
    Gravity.FILL

           
    Case 1:
               
    'Displays the name
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = ofName.GetValueForID(RowID)

           
    Case 2:
               
    'Displays the origin
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = ofOrigin.GetValueForID(RowID)

           
    Case 3:
               
    'Displays the quantity
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = ofQty.GetValueForID(RowID)
       
    End Select
    End Sub

    Sub Fruits_ReadFromDB(ID As Object) As Object
       
    If ID <> Null Then
           dbCursor.Position = 
    ID
           
    Dim oField As ObservableField = Sender
           
    If oField = ofImage Then
               
    'Retrieves the image from the database
               Dim binImage() As Byte, Flux As InputStream
               binImage = dbCursor.GetBlob(
    "Image")
               Flux.InitializeFromBytesArray(binImage, 
    0, binImage.Length)
               
    Dim Bmp As Bitmap
               Bmp.Initialize2(Flux)
               Flux.Close
               
    Return Bmp
           
    Else If oField = ofName Then
               
    'Retrieves the name from the database
               Return dbCursor.GetString("Name")
           
    Else If oField = ofOrigin Then
               
    'Retrieves the origin from the database
               If dbCursor.GetInt("Exotic") = 0 Then
                   
    Return "native"
               
    Else
                   
    Return "exotic"
               
    End If
           
    Else If oField = ofQty Then
               
    'Retrieves the quantity from the database
               Return dbCursor.GetInt("Quantity")
           
    End If
       
    End If
       
    Return Null
    End Sub
    The same result could be achieved with this code:
    Code:
    Sub Item_RowContentFiller(RowID As Long, LayoutName As String, CellPanel As Panel, CellIndex As Byte, Position As Int)
       
    Select CellIndex
           
    Case 0:
               
    'Displays the bitmap
               Dim IV As ImageView = CellPanel.GetView(0)
               IV.Bitmap = GetValueForField(
    "Image", RowID)
               IV.Gravity = 
    Gravity.FILL

           
    Case 1:
               
    'Displays the name
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = GetValueForField(
    "Name", RowID)

           
    Case 2:
               
    'Displays the origin
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = GetValueForField(
    "Exotic", RowID)

           
    Case 3:
               
    'Displays the quantity
               Dim lbl As Label = CellPanel.GetView(0)
               lbl.Text = GetValueForField(
    "Quantity", RowID)
       
    End Select
    End Sub

    Sub GetValueForField(Field As StringID As Long) As Object
       dbCursor.Position = 
    ID
       
    If Field = "Image" Then
           
    'Retrieves the image from the database
           Dim binImage() As Byte, Flux As InputStream
           binImage = dbCursor.GetBlob(Field)
           Flux.InitializeFromBytesArray(binImage, 
    0, binImage.Length)
           
    Dim Bmp As Bitmap
           Bmp.Initialize2(Flux)
           Flux.Close
           
    Return Bmp
       
    Else If Field = "Name" Then
           
    'Retrieves the name from the database
           Return dbCursor.GetString(Field)
       
    Else If Field = "Exotic" Then
           
    'Retrieves the origin from the database
           If dbCursor.GetInt(Field) = 0 Then
               
    Return "native"
           
    Else
               
    Return "exotic"
           
    End If
       
    Else If Field = "Quantity" Then
           
    'Retrieves the quantity from the database
           Return dbCursor.GetInt(Field)
       
    End If
       
    Return Null
    End Sub
     
  14. Informatix

    Informatix Expert Licensed User

    Starting from September, ULV and most of the ProBundle libraries will be available for free. You can still donate for them if you wish.
     
    ellpopeb4a, Jaames, fredo and 6 others like this.
  15. cimperia

    cimperia Active Member Licensed User

    Wow, thank you. I've been using your excellent ULV library. I'll take the opportunity to visit your ProBundle library.

    What prompted you to make this generous offer?
     
    Last edited: Aug 22, 2018
  16. Informatix

    Informatix Expert Licensed User

    Personal drama and declining donations.
     
    Star-Dust and peacemaker like this.
  17. npsonic

    npsonic Active Member Licensed User

    Will you share source code for all libraries? Without the source code it's kind of dangerous or impossible to use libs created by others in projects that are published in play store as there is no updates in case of problems.
     
    fredo likes this.
  18. Star-Dust

    Star-Dust Expert Licensed User

    You're wrong, otherwise you should buy the sources of all the libreries. When a library is abandoned, 2 of them are the same or better.
    However, most of the libraries in this forum are always supported and @Informatix gives excellent assistance.
     
    Last edited: Aug 18, 2018
  19. Star-Dust

    Star-Dust Expert Licensed User

    I'm sorry for your personal drama
     
    Informatix likes this.
  20. npsonic

    npsonic Active Member Licensed User

    I don't know what libs are you referring to, but at least 50% of libs in forum are created and there is no support after that.
    If source code is not shared with the lib you would just take a risk with the future problems and possibility that you have to create whole lib your self if it's important part of your app.

    I know nothing about situation of Informatix, but support for paid libs are most certainly not the same as libs shared free.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice