Hi guys,

For some reason, an activity's onActivityResult method is not being
called.  It is a tab within a tab Activity which is sending a
startActivityForResult to an independent activity.  Here is the
relevant code.

in MealsTodayList class:
void createEntry()
        {
                Intent newMeal = new Intent(this, MealAdder.class);
                newMeal.setAction(NEW_MEAL);
                newMeal.putExtra(MealDbAdapter.KEY_DATE, todayDate);
                startActivityForResult(newMeal, NEW_ENTRY); //NEW_ENTRY=1
        }

in MealAdder class:
public void saveNewEntry(View v)
        {
                Intent mealEntryIntent = new Intent(this,MealsTodayList.class);
                [...]
                if (updatedEntry)
                {
                        this.setResult(RESULT_EDIT_OK, mealEntryIntent);
                }
                else
                {
                        this.setResult(RESULT_OK, mealEntryIntent);
                }
                finish();
        }


In this case, the activity MealAdder is completed once the save button
is called, which calls this method.

Any suggestions would be magnificent.  Thanks!

-- 
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