Android Question FileDialog Problem with Sdk 27

Mauricio Pereira

Member
Licensed User
Longtime 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
Longtime 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.
 
Upvote 0

Mauricio Pereira

Member
Licensed User
Longtime 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

  • SDK.zip
    307.8 KB · Views: 264
Upvote 0

johndb

Active Member
Licensed User
Longtime 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.
 
Upvote 0

Geezer

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