Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6549393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:05:16+00:00 2026-05-25T12:05:16+00:00

I ‘m calling getParent().setResult(0) in TabActivity . This is called when the user hits

  • 0

I ‘m calling getParent().setResult(0) in TabActivity. This is called when the user hits previous button. I want the current activity to close and get deleted from the stack.

getparent() returns null. Can someone tell me why does that happen??

getParent().setResult(0);
finish();

Thanks

UPDATE: This is the definition of getParent()…What does embedded child mean. And secondly is the TabActivity an embedded child if it is called from another Activity??

public final Activity getParent ()
Return the parent activity if this view is an embedded child.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:05:17+00:00Added an answer on May 25, 2026 at 12:05 pm

    You haven’t clearly stated you’re question. You want to understand how to pass a result back from an Activity to the Activity which called it. You must first understand that Activities aren’t hierarchical even though they are kept on a back stack. Later activities do not belong to the Activity they are called from.

    However, here is the answer the question you meant to ask:

    You are using startActivityForResult(Intent, int) (Which you can read up on here)

    When Activity A calls startActivityForResult() method Activity B is started, this should do whatever processing is required and then when it exits either call:

    setResult(RESULT_OK)
    

    when a yes/no is required or

    setResult(RESULT_OK, intent)
    

    where intent is an Intent which contains bundled information you want to use in Activity A to act upon.
    After Activity B exits Activity A will resume and call the method:

     protected void onActivityResult(int requestCode, int resultCode, Intent data)
    

    This is where you will process the result.

    You can read all about this here:

    http://developer.android.com/reference/android/app/Activity.html#StartingActivities

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but
Hi if i run my project its indicate this logcat error...how to solve this
I'm taking a photo with my app, the delegate method is called, the Image
Does anyone know how can I replace this 2 symbol below from the string
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.