Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

No path return when I use DIR_SELECT #2

Closed
einverne opened this issue Aug 3, 2016 · 10 comments
Closed

No path return when I use DIR_SELECT #2

einverne opened this issue Aug 3, 2016 · 10 comments

Comments

@einverne
Copy link

einverne commented Aug 3, 2016

I have these config:

                DialogProperties properties = new DialogProperties();
                properties.selection_mode = DialogConfigs.SINGLE_MODE;
                properties.selection_type = DialogConfigs.DIR_SELECT;
                properties.root = new File("/sdcard/facedetect");
                properties.extensions=null;

                FilePickerDialog dialog = new FilePickerDialog(MainActivity.this, properties);
                dialog.setDialogSelectionListener(new DialogSelectionListener() {
                    @Override
                    public void onSelectedFilePaths(String[] files) {

                    }
                });
                dialog.show();

I have noticed that if I use DIR_SELECT , I cannot get the path from String[] files. Following is the screenshot

image

@singhangadin
Copy link
Owner

Can you see check boxes for selecting directories?

@singhangadin
Copy link
Owner

I think you might have forgotten to set fileselectlistener to the dialog

@einverne
Copy link
Author

einverne commented Aug 3, 2016

I have set the listener, and I cannot get any value for the listener callback. If I use DIR_SELECT I cannot even see checkbox. And I cannot even change my root dir.

@singhangadin
Copy link
Owner

singhangadin commented Aug 3, 2016

You have not setProperties of dialog either through constructor or functions. Which is the reason why you are getting default configurations....

@einverne
Copy link
Author

einverne commented Aug 4, 2016

I have updated my problem.

@singhangadin
Copy link
Owner

Is there any sub directory in '/sdcard/facedetect' directory? and does '/sdcard/face' directory exist?

@einverne
Copy link
Author

einverne commented Aug 4, 2016

Yes, it exist.

@singhangadin
Copy link
Owner

Is facedetect empty?

@einverne
Copy link
Author

einverne commented Aug 4, 2016

In my demo, fecedetect is not empty. Can I get the root folder path I choose in call function? Or I can only get the file path I choose?

@einverne
Copy link
Author

einverne commented Aug 4, 2016

OK, I got it. If I choose to set the root, I cannot go up to it's parent folder. I have solved it. And I can only get the path I choose using the checkbox. I was thinking that if I didn't choose anything, the lib will return the root folder path.

And by the way, really thanks for your work.

@einverne einverne closed this as completed Aug 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants