this is my first post here so i hope i find some help on my problem:
I have one texteditor-activity and a little filebrowser-activity which i can start from the texteditor using intents.
I also can open the files in the texteditor by passing the absolute path back to the editor... No Problems so far...
Now the problem:
The filebrowser has an option that when a folder is clicked, it restarts itself with the path of the clicked folder.
After that happened, and clicking a file, the filebrowser gets closed (as it should), but the editor doesn't get the returnkey anymore.
calling the browser from the editor:
Using java Syntax Highlighting
- String currentdir = basedir.toString();
- Intent i = new Intent(EditorActivity.this, Filebrowser.class);
- i.putExtra("currentdir", currentdir);
- startActivityForResult(i, REQUEST_CODE);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
returning the absolute path of a file clicked in filebrowser:
Using java Syntax Highlighting
- Intent intent = new Intent();
- intent.putExtra("returnKey1", files_array.get(o));
- setResult(RESULT_OK, intent);
- finish();
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
restarting the filebrowser after a folder is clicked (after that, nothing gets returned to the editor anymore):
Using java Syntax Highlighting
- Intent intent = new Intent(this, Filebrowser.class);
- intent.putExtra("currentdir", newdir);
- startActivityForResult(intent, REQUEST_CODE);
- finish();
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
The editors return method:
Using java Syntax Highlighting
- public void onActivityResult(int requestCode,int resultCode,Intent data) {
- if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {
- String returnKey = data.getStringExtra("returnKey1");
- //followed by opening & reading the file
Parsed in 0.036 seconds, using GeSHi 1.0.8.4
Thx for any help & Best regards

