Display list of files on SD card
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-17 1:08 PM
Hello,
im working on MP3 player. I would like to show list of files/folders(file system) in the FAT system on SD card and open them. The length of list is dynamically based on content of SD card. What is the good approach to do this?
Thanks for the tips.
- Labels:
-
TouchGFX
-
TouchGFX Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-17 3:12 PM
Hello,
Look at the implementation of one of the Audio file player/record examples that provides a folder "explorer".
For example:
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-18 12:55 AM - edited ‎2024-09-18 12:55 AM
Thanks for your reply. I meant can be done by some container with scroll bar?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-19 1:14 AM - edited ‎2024-09-19 1:34 AM
Hello @Petr3 ,
That sounds like a perfect job for the scroll list widget .
As you can have thousands of music, it would be appropriate to limit the number of elements in your scroll list and to update these elements to reflect the current music to display.
I see 2 ways of doing that :
- Have a linear scroll list offsetted : have 30 elements, center the scroll list at element 10 (instead of 0), this way you have elements above and below, allowing the user to scroll up or down, you can fetch the scrolled amount with the getScrolledY() method and update the elements accordingly (show music number "previousOffset + getScrolledY()/heightOfElement" and then recenter the scrollList to element 10 with setPosition() ).
- Have a circular scroll list : once you have scrolled past the number of elements in the container, you have to update these elements to show music 1+nbrOfScrollElements
Here is a bad illustration of it:
It is important to have more elements than what is visible to allow for proper updating during the scroll, because updating the elements can only happen once the scroll is finished (as far as I know).
I hope this helps.
Regards,
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-30 7:33 AM
Hello @Petr3 ,
Were you able to move forward on your issue?
Regards,
Software engineer at ST (TouchGFX)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-01-05 12:26 PM
Hello @GaetanGodart ,
not yet, but i hope i will work on that this month. I will send an update when it will be some issue/progress.
Regards,
Petr3
