Android Tutorial B4XTable - Photos Album

Status
Not open for further replies.
SS-2019-03-03_13.10.22.jpg


In this example the table is used to show the camera roll photos.

Main steps:
1. Get permission to access the external storage.
2. Collect the image files from several folders.
3. Add the columns and add ImageViews to all cells.
4. Load the images when the table is updated.
5. Show a dialog with a large image when an image is clicked.
 

Attachments

  • B4XTable-Album.zip
    10.7 KB · Views: 770
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
Just-in-Time :D
 

little3399

Active Member
Licensed User
Longtime User
running error ...

Edit (Erel): I've removed the large image. You should never post code or error messages as images.
 

Attachments

  • upload_2019-3-3_19-55-34.png
    upload_2019-3-3_19-55-34.png
    104.4 KB · Views: 748
Last edited by a moderator:

GMan

Well-Known Member
Licensed User
Longtime User
As i see: there is not the photoalbum example included
 

sz4t4n

Member
Licensed User
Longtime User
I have error with missing .jar
B4X:
B4A Version: 8.80
Parsing code.    (0.13s)
Building folders structure.    (0.09s)
Compiling code.    (0.57s)
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.00s)
Generating R file.    (0.43s)
Compiling generated Java code.    Error
Cannot find: D:\Basic4android\libraries\b4xformatter.jar


But b4xformatter is a .b4xlib. Did I missed something?

upload_2019-3-3_15-14-2.png
 

sz4t4n

Member
Licensed User
Longtime User
Ok its working fine. I have to close and open again program and its OK. Sorry for trouble
 

GMan

Well-Known Member
Licensed User
Longtime User
In the Table-Example is not the Photoalbum example, but another Table-Example
B4X:
    'create the columns
    B4XTable1.AddColumn("US County", B4XTable1.COLUMN_TYPE_NUMBERS)
    B4XTable1.AddColumn("Name", B4XTable1.COLUMN_TYPE_TEXT)
    Dim StateColumn As B4XTableColumn = B4XTable1.AddColumn("State", B4XTable1.COLUMN_TYPE_TEXT)
    StateColumn.Width = 80dip
    NumberColumn = B4XTable1.AddColumn("Interesting Number", B4XTable1.COLUMN_TYPE_NUMBERS)
    CreateCustomFormat(NumberColumn)
    
    'load the data
    Dim su As StringUtils
    Dim headers As List
    headers.Initialize 'the list is only used to skip the headers row
    Dim data As List = su.LoadCSV2(File.DirAssets, "us_counties.csv", ",", headers)
    B4XTable1.SetData(data)
 

GMan

Well-Known Member
Licensed User
Longtime User
The photo album example is attached to the first post.
Yo, i downloaded this and its the shown example with the Database Tables
 

GMan

Well-Known Member
Licensed User
Longtime User
I downloaded it again and now its the rigth one

OK, i downloaded the other Example before, too - the same name :D
 
Status
Not open for further replies.
Top