Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1: The ... goes back to the beginning instead of back one folder. #2

Open
Adam-Anthony opened this issue Aug 10, 2016 · 4 comments
Open

Comments

@Adam-Anthony
Copy link
Collaborator

I think it'll be easy to implement by grabbing path and just separating by / and throwing away the last part.

@randyfortier
Copy link
Collaborator

If you are using java.io.File as the data source (e.g. ArrayList), then you can just use the getParentFile() method of that class to return the parent. There are some subtle differences between platforms, which is why it is best to use the built-in functionality.

@randyfortier
Copy link
Collaborator

This class can also make it easier to find the contents, if you aren't already using it. If you aren't, though, this could be a big change with little benefit (since this is all Android, so platform differences should not be an issue).

@randyfortier
Copy link
Collaborator

The easier way, without switching to ListView would be to use filename.lastIndexOf("/") and use that as the end index in filename.substring(0, end).

@randyfortier randyfortier changed the title The ... goes back to the beginning instead of back one folder. #1: The ... goes back to the beginning instead of back one folder. Aug 10, 2016
@Adam-Anthony Adam-Anthony reopened this Aug 19, 2016
@Adam-Anthony
Copy link
Collaborator Author

.. now successfully goes back a single folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants