B4A Library Dialogs library

Status
Not open for further replies.

ivan.tellez

Active Member
Licensed User
Wow, great job, really useful.

I just want to contribute with some suggestions..

On the Input box
  • wen it opens, the edit has the focus, but the keyboard dont appear until you click the edit, it shoud appear when the dialog opens.
  • will be useful having a "MaxLenght" property
  • Stetic: I think it will look better if you add a little space between the edit and the area of the buttons.

Thanks :)
 

fabio.guerrazzi

Member
Licensed User
Help

Core 3.80
Dialogs 2.92

Compiling log below:

Parsing code. 0.00
Compiling code. 0.30
Compiling layouts code. 0.00
Generating R file. 0.02
Compiling generated Java code. 0.78
Convert byte code - optimized dex. 0.57
Packaging files. 0.11
Copying libraries resources Error
Impossibile trovare il file 'C:\0\MyExamle\Objects\bin\temp.ap_.521.tmp'.


If I remove the reference to Dialogs lib everything work fine
Thank you for answers
 

fabio.guerrazzi

Member
Licensed User
No, thanks but saddly it doesnt solve the problem.
I've 2 windows pc where I'm used to code.

a notebook Win8 64 and emulator
another one tower pc with Win7 64 and Samsung S2 throught wireless.

on Win7 works all fine, on Win8 only if I disable and comment Dialogs references

on Win8 "Test Compilation" ends succesfully

I re-copied Dialogs.jar and xml to \libraries assuming that files might have been corrupted.. no way

any other clue?
 

Douglas Farias

Expert
Licensed User
@agraham
hi man can you add the options on filedialog?
-Change Text Colors
-Change BGColors
-Change (..) to any other string (Back) for exemple
-Remove ↓Files ↓

BUG:
-in the Holo.Light theme the text is white and the bg is white too *-* cant see files to click

thx
 

mat2175

Member
Licensed User
I totally agree. The filedialog would be more user friendly if these options were added.
Please update the library @agraham

Thanks :)
 
Last edited:

Touch

Active Member
Licensed User
Hi agraham,
I use the Theme: Theme.Holo.Light
B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
I insert in my app your library for use FileDialog, but the file selection window displays the text color as the background color.
It is possible change the text color?
 

Informatix

Expert
Licensed User
Hi agraham,
I use the Theme: Theme.Holo.Light
B4X:
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
I insert in my app your library for use FileDialog, but the file selection window displays the text color as the background color.
It is possible change the text color?
There's a file explorer class that can replace this file dialog, if needed. And starting from September, the donationware version will be free.
 

Informatix

Expert
Licensed User
Hello Informatix, I tried your class, but I can not change the background color of the text box. Where do you see the result of the choice.
There's an example provided with the class that shows a background with a custom color. You just have to do the same.
 

Gary Milne

Active Member
Licensed User
Hi, I tried using the Color Picker Demo project (in Landscape mode) and on my Nexus 5 (4.4.4) the bottom part of the color bars is truncated and I can only see Red and part of the Green and then the buttons appear as normal. #SupportedOrientations: unspecified so I assumed it was intended to work on both. My Nexus 7 works fine.

P.S. I like the HSV dialog, I think it's the simplest for users to pick a color from (when you want a range). I think a nice addition would be the ability to specify the input parameters in RGB and have the dialog convert that to HSV (for the purpose of showing an existing color). B4A is predominantly weighted towards RGB and having to work with multiple color conversions is a pain.

Good work.
 

warwound

Expert
Licensed User
@agraham

Would you be prepared to let me have the source code for the Dialogs library so that i can attempt to fix the problem with the FileDialog file list text and background colors?

Thanks.

Martin.
 

warwound

Expert
Licensed User
Thanks to @agraham for letting me have the Dialogs library source.

Here is Dialogs version 2.93, i have added a new method to the FileDialog:

GetSingleLineLayout As SingleLineLayout
Gets the SingleLineLayout that will be used to populate the files list.
The SingleLineLayout defines the appearance and layout of the file list items.
See the ListView documentation for info about using the SingleLineLayout.


The ListView documentation can be found here: http://www.b4x.com/android/forum/threads/listview-tutorial.6537/.
Read the section Customizing each type in post #1 of that thread for more info.

This update will be useful to those that use a theme such as Holo.Light.
Without this update the items in the files list will have a light background color and a light text color, making it next to impossible to read the item text.
Look at the attached 'before' and 'after' screenshots.
These are both taken from a project where the application theme is Holo.Light.

Usage of the new method is simple, just get the SingleLineLayout from the FilesDialog and set background and/or text color so that your file list items are readable:

B4X:
Sub btnFile_Click
	Dim FileDialog1 As FileDialog
	FileDialog1.FastScroll = True
	FileDialog1.FilePath = File.DirRootExternal
	FileDialog1.KeyboardPopUp=False
	FileDialog1.ShowOnlyFolders = True
	
	'	set the file list style
	FileDialog1.GetSingleLineLayout.Label.TextColor=Colors.Black
	
	Dim Icon As Bitmap
	Icon.Initialize(File.DirAssets, "android48.png")
	Dim Action As Int = FileDialog1.Show("Select backup location:", "OK", "Cancel", "", Icon)
	
	Select Action
		Case DialogResponse.CANCEL
			ToastMessageShow("Backup cancelled", True)
		Case DialogResponse.POSITIVE
			ToastMessageShow("Backup to: "&FileDialog1.FilePath, True)
	End Select
End Sub
I've attached library version 2.93 to this post, if agraham wants to add it to post #1 in this thread then i'll remove it from this post to keep the thread tidy.
Also attached in the source code for version 2.93.

Martin.
 

Attachments

warwound

Expert
Licensed User
Oooops....

I forgot to mention in my previous post that when the FileDialog ShowOnlyFolders property is set to True, the EditText used for file name input is hidden.

Martin.
 

deantangNYP

Active Member
Licensed User
May i know if its possible to do auto file filtering?
Example: if user input "xyz" into the edit box on the FileDialog, only filenames with "xyz" will appear.
Please help. thanks.
 
Status
Not open for further replies.
Top