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

  • SEARCH
  • Home
  • 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 6689899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:34:23+00:00 2026-05-26T05:34:23+00:00

Here is the scenario: I have an activity with 4 tabs, each tab with

  • 0

Here is the scenario:
I have an activity with 4 tabs, each tab with a different intent, each intent with a different activity.
Works perfectly.

What I need is, to somehow change the intent on one of the tabs.
It would be as simple as adding extra parameters to the Intent that is used on the TabSpec.setContent(intent), but I have not found a way to retrieve that intent to change it.

The specific action I’m trying to do is: from another activity (that is inside the content of another tab) I call it’s parent (the TabActivity) to open a different tab AND add some custom data to that tab’s activity.

I can change the tab without a problem, but I haven’t found a way to pass the extra parameters from one activity to the other, since the original intent used to create the TabSpec had no extra parameters.

Am I approaching this in the wrong way?

Is there a way to replace the TabSpec content’s intent?

Thanks !

  • 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-26T05:34:23+00:00Added an answer on May 26, 2026 at 5:34 am

    If you are just trying to find a way to pass values between activities you can override the Application class.

    Way to use app context.

    Extend the application class and add your values as its attributes. In any activity, if you call the below code, it will return a singleton.

    MyApplication appContext = (MyApplication) getApplicationContext();
    

    To make this work you need to add this to the application tag of the manifest file

     android:name=".MyApplication"
    

    This method is used to pass values around the app when sending through intent is not possible.

    To remove the tab, you will need to use the clearAllTabs() method and add the tabs again. The above code should be better.

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

Sidebar

Related Questions

So, Here is my scenario: I have two activity and one service --> all
Here's scenario: I have 2 activities and one service First activity is a landing
Here's the scenario I have a Grid with some TextBlock controls, each in a
Here's my scenario: I have a page containing several links; each link is meant
Here's my scenario: I have one page that collects certain data from the user.
Here is the scenario: You have a Persons table with a one-to-many relationship with
Here's the scenario I have an activity(A) which has a button and textview. I
Here's my scenario: I have a drop down menu, with different values. When option
Here's the scenario: In activity A I have post to Twitter option which calls
Here the scenario is: I have a canvas with different diagrams drawn on it.

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.