I'm using an editing tool with ArcGIS maps.First i launch my MainActivity and there user may draw some drawings on the map.And another drawing wants to do from the list menu in material design navigation drawer, there's an item called file browser.Here after clicked that item it goes to another activity called file browser.after selecting relevant file from there i want to launch MainActivity with the edited drawings. In my MainActivity;
public void onNavigationDrawerItemSelected(int position) {
switch (position) {
case 1: {
onPause();
Intent intent = new Intent(MainActivity.this, filechooser.class);
startActivity(intent);
break;
}
default:
break;
}
}
In FileChooser activity;
//Here selecting relevent file for the drawings.Really here selecting file which contains relevent coordinates for drawings on the map and pass the file path to MainActivity.Map is on the MainActivity.This activity contains only a file browser.
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
Option o = adapter.getItem(position);
if (o.getdata().equalsIgnoreCase("folder") || o.getdata().equalsIgnoreCase("Parent Directory")) {
direction = new File(o.getPath());
fill(direction);
} else {
filepath = o.getPath();
Intent intent2 = new Intent(filechooser.this, MainActivity.class);
//but here i want to go to MainActivity with previous drawings not just to want restart activity.
intent2.putExtra("path", filepath);
startActivity(intent2);
}
}
So can i do that? If so please help me.Sory for my Engish :(
Aucun commentaire:
Enregistrer un commentaire