Hey Joey - first off, it looks like you are testing for the resultCode == 0 
in your onActivityResult() method.  You should be looking for whatever you 
set your result to in your BaseIngredient Activity (looks like you're using 
RESULT_OK).

In addition, if you've changed the "launchMode" of an Activity, then 
there's a good chance that you will *not* get the result back.  For 
example, singleTask will put each Activity into separate Tasks, and one 
Activity won't ship the result back to the other Activity without some 
additional work.
http://developer.android.com/guide/topics/manifest/activity-element.html#lmode
 

I hope this helps!
-Matt
www.sep.com/mcterry

On Thursday, March 22, 2012 10:43:24 AM UTC-4, Joey Selah wrote:
>
> Actually excuse me, 
>
> I've mixed the classed up some how.  Below is the correct code: 
>
> public class BrewJournalEdit extends Activity { 
>     @Override 
>     protected void onCreate(Bundle savedInstanceState) { 
>         super.onCreate(​savedInstanceState); 
>         setContentView(R.layout.brew_​journal_edit); 
>         baseIngredientButton.​setOnClickListener(new 
> View.OnClickListener() { 
>             public void onClick(View view) { 
>                 Intent intent = new 
> Intent().setClass(​BrewJournalEdit.this, BaseIngredientEdit.class); 
>                 int requestCode = 0; 
>                 startActivityForResult(intent, requestCode); 
>             } 
>         }); 
>     @Override 
>     protected void onActivityResult(int requestCode, int resultCode, 
> Intent data) 
>     { 
>         if(resultCode == 0) 
>         { 
>         } 
>     } 
> } 
>
> public class BaseIngredientEdit extends Activity { 
>     @Override 
>     protected void onCreate(Bundle savedInstanceState) { 
>         super.onCreate(​savedInstanceState); 
>         setContentView(R.layout.brew_​base_ingredients_edit); 
>         Button confirmButton = (Button) findViewById(R.id.confirm); 
>         confirmButton.​setOnClickListener(new View.OnClickListener() { 
>             public void onClick(View view) { 
>                 setResult(RESULT_OK); 
>                 finish(); 
>             } 
>         }); 
>
> On Mar 19, 10:21 pm, FiringCode <kims...@gmail.com> wrote: 
> > Intent().setClass(​BrewJournalEdit.this, BaseIngredientEdit.class); 
> > 
> > to 
> > 
> > Intent().setClass(​BaseIngredientEdit.this, BrewJournalEdit.class);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to