Android Question FileDialog Problem with Sdk 27

Mauricio Pereira

Member
Licensed User
I have an application compiled with B4A version 7.01 where I use:
- Dim fd as fileDialog
----
fd.FastScroll = True
fd.FilePath = File.Combine(File.DirInternal,"")
fd.FileFilter = ".pl"
Main.resp = fd.Show("Choose the model", "Edit", "Cancel", "", Null)
....
If I compile with the SDK 19 all the files in the directory are listed.
If I compile with the SDK 27 no directory file is listed.
Same behavior with versions 3.0 and 4.01 of dialogs

Any suggestions?
 
Last edited:

Mauricio Pereira

Member
Licensed User
Geezer,

Thank you for your reply but works in emulation but does not work on my phones:
Moto X Pure Edition - Android 7.0
Samsung Galaxy A9 Pro - Android 8.0
It happens what I reported in the initial message.
 

Mauricio Pereira

Member
Licensed User
Erel,

I am attaching small program where the problem reported in the first message occurs.
In emulation works...
In my phones:
Moto X Pure Edition - Android 7.0
Samsung Galaxy A9 Pro - Android 8.0,
the problem occurs.
With Sdk19 no problem occurs.
 

Attachments

johndb

Active Member
Licensed User
Erel,

I am attaching small program where the problem reported in the first message occurs.
In emulation works...
In my phones:
Moto X Pure Edition - Android 7.0
Samsung Galaxy A9 Pro - Android 8.0,
the problem occurs.
With Sdk19 no problem occurs.
I think that you will have to implicitly define the text color for it to work.
B4X:
Sub ShowF
    Dim fd As FileDialog
    fd.TextColor = Colors.black
    fd.FastScroll = True
    fd.FilePath = File.Combine(File.DirInternal,"")
    fd.FileFilter = ".pl"
    resp = fd.Show("Selecione o modelo", "Editar", "Cancelar", "", Null)
   
End Sub
Your sample will not show the filenames without setting the dialog text color.
I am testing it on Google Pixel. No errors otherwise.
 

Geezer

Active Member
Licensed User
As John said ... the textcolor line is required to show the listing on a Samsung s8+
 

Mauricio Pereira

Member
Licensed User
John,

Thanks for your hint.
Worked....
The interesting thing is that with the SDK19 works without the TextColor.
Thanks to Geezer too.
 
Top