Permalink
Browse files

Reference the Application Object, only reload the datastructures if n…

…eeded
  • Loading branch information...
1 parent 507da77 commit 1a0c03b114442593af304adfafd1730a6e2e6df1 @matburt committed Feb 23, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/com/matburt/mobileorg/MobileOrgActivity.java
@@ -80,7 +80,6 @@ public View getView(int position, View convertView, ViewGroup parent) {
private static final int OP_MENU_OUTLINE = 3;
private static final int OP_MENU_CAPTURE = 4;
private static final String LT = "MobileOrg";
- private static Node rootNode = null;
private Synchronizer appSync;
/** Called when the activity is first created. */
@@ -130,7 +129,13 @@ public void onListItemClick(ListView l, View v, int position, long id) {
appInst.nodeSelection.add(new Integer(position));
dispIntent.putIntegerArrayListExtra("nodePath", appInst.nodeSelection);
- startActivity(dispIntent);
+ startActivityForResult(dispIntent, 1);
+ }
+
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ MobileOrgApplication appInst = (MobileOrgApplication)this.getApplication();
+ appInst.nodeSelection.remove(appInst.nodeSelection.size()-1);
}
public boolean onShowSettings() {

0 comments on commit 1a0c03b

Please sign in to comment.