Android Question xCustomListView problem

Discussion in 'Android Questions' started by anglia, Aug 24, 2019.

  1. anglia

    anglia Member Licensed User

    I'm writing an app where the user needs to select an image from a folder by tapping on a thumbnail copy of the image.
    There could be hundreds of jpg/png images in the folder.

    xCustomlistview seems the best way to go. What I've done is substituted the 4 jpeg files in the Assets folder (Erel's example) with files in the images folder by using Listfiles to load the bitmaps list.

    The list contains 152 jpg ffiles and 170 png files (total 322). Max sizes are approx 700 kb for jpg and 80kb for png.
    The example works fine until it gets to "Item 300" and then the program crashes. It works fine with only 30 image files.

    Is xCustomListview the best solution or should I look elsewhere? I've tried Media browser, but the images list takes too long to appear.
    I'm using a Samsung Tab4 with Android version 5.1.1.

    If anyone would take a look at the example code below and advise where I might be going wrong, I'd be very grateful.
     

    Attached Files:

  2. JohnC

    JohnC Well-Known Member Licensed User

    mangojack, José J. Aguilar and Xicu like this.
  3. anglia

    anglia Member Licensed User

    Thanks John

    The example uses Loadbitmapresize which I thought would load a smaller version of the image.
    I also thought that using xCustomlistview meant that images are only loaded as needed and the number/size of images was irrelevant.
    Looks like I'll have to find an alternative to xCustomlistview.
     
  4. JohnC

    JohnC Well-Known Member Licensed User

  5. JohnC

    JohnC Well-Known Member Licensed User

    anglia likes this.
  6. Erel

    Erel Administrator Staff Member Licensed User

    anglia likes this.
  7. anglia

    anglia Member Licensed User

    Thanks John and Erel,

    I'll have a good look at Erel's lazy loading suggestion.
     
  8. anglia

    anglia Member Licensed User

    John,

    Just had a quick look at ultimatelistview. Looks very interesting.
     
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