Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
Android
»
How to load list of internal app file in jlistview ?
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Drag and Drop from Window...
by
jamie
[
Today
at 12:36:44 am]
MOVED: Trunk builds + pre...
by
trev
[
Today
at 12:05:35 am]
(SOLVED) TSynEdit new syn...
by
Martin_fr
[April 12, 2021, 11:38:39 pm]
fpc for openbsd aarch64/a...
by
jcarlos77
[April 12, 2021, 11:38:16 pm]
Tutorial for debugging co...
by
marcov
[April 12, 2021, 11:18:26 pm]
Contemporary Pascal Discu...
by
marcov
[April 12, 2021, 11:16:07 pm]
[solved] How to find comp...
by
Muso
[April 12, 2021, 10:54:30 pm]
Post-Pascal
by
marcov
[April 12, 2021, 10:49:40 pm]
sparta в 2.0.12
by
Michl
[April 12, 2021, 10:30:14 pm]
No warning from FPC with ...
by
MarkMLl
[April 12, 2021, 10:05:37 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to load list of internal app file in jlistview ? (Read 503 times)
rsu333
New Member
Posts: 24
How to load list of internal app file in jlistview ?
«
on:
February 24, 2021, 03:59:45 pm »
Is it possible to load list of files present in internal app to jlistview ?
When using command
self.getListoffiles
then how to display it in jlistview ?
.
Thank you.
Logged
jmpessoa
Hero Member
Posts: 1791
Re: How to load list of internal app file in jlistview ?
«
Reply #1 on:
February 27, 2021, 03:55:47 am »
Code: Pascal
[Select]
[+]
[-]
procedure
TAndroidModule1
.
jButton1Click
(
Sender
:
TObject
)
;
var
list
:
TDynArrayOfString
;
count
,
i
:
integer
;
begin
list
:
=
Self
.
GetFileList
(
Self
.
GetEnvironmentDirectoryPath
(
dirDownloads
)
)
;
//or another dir
count
:
=
Length
(
list
)
;
for
i
:
=
0
to
count
-
1
do
begin
jListView1
.
Add
(
list
[
i
]
)
;
end
;
SetLength
(
list
,
0
)
;
//free array
end
;
Logged
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard
rsu333
New Member
Posts: 24
Re: How to load list of internal app file in jlistview ?
«
Reply #2 on:
February 27, 2021, 07:53:12 am »
Thanks a lot. I will try it soon.
Logged
jmpessoa
Hero Member
Posts: 1791
Re: How to load list of internal app file in jlistview ?
«
Reply #3 on:
February 27, 2021, 06:44:11 pm »
And don't forget: you need request "user permission" to read and write files informations ...
Logged
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
Android
»
How to load list of internal app file in jlistview ?
TinyPortal
© 2005-2018