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 8583103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:27:19+00:00 2026-06-11T21:27:19+00:00

I have a tabActivity class. class MainActivity extends TabActivity { TabHost tabHost = getTabHost();

  • 0

I have a tabActivity class.

class MainActivity extends TabActivity {
    TabHost tabHost = getTabHost();

TabSpec tabOne= tabHost.newTabSpec("Tab One");
tabOne.setIndicator("Tab One", getResources().getDrawable(R.drawable.tab1));
Intent tabOneIntent = new Intent(this, PhotosActivity.class);
tabOne.setContent(tabOneIntent);

TabSpec tabTwo= tabHost.newTabSpec("Tab Two");
tabTwo.setIndicator("Tab Two", getResources().getDrawable(R.drawable.tab2));
Intent tabTwoIntent = new Intent(this, TabTwo.class);
tabTwo.setContent(videosIntent);

tabHost.addTab(tabOne);
tabHost.addTab(tabTwo);
}

And one of the tabs is

class TabTwo extends Acitity implements OnClickListener{
    public void onClick(View view) {
       //open a new activity within the tab  
    }
}

And the dummy activity is

class DummyActivity extends Activity {
}

When I click tab two, TabTwo class is invoked. When I click a button from within the class, I want to open a DummyActivity within the tab. The code being used now is

context.startActivity(intentObject);

This will open the new activity in absolutely new window. How can I open the DummyActivity from within the tab?

Thanks in advance!

@all Thanks for the responses. I solved the issue using ActivityGroup and child activties.

  • 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-06-11T21:27:20+00:00Added an answer on June 11, 2026 at 9:27 pm
    1. It does not looks like usual android app experience. Be very careful with doing such things.

    2. Since 3.0 it’s better to use Fragments. If you want to support earlier devices – use compatibility library.

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

Sidebar

Related Questions

I have 2 tabs, named : Tab1, Tab2 class MainActivity extends TabActivity. MainActivity.java public
Hi guyzz I have TabActivity as following simple code public class TabhostActivity extends Activity{
I have a class for my TabActivity public class DashboardActivity extends TabActivity This has
public class SoapBox extends TabActivity{ private TabHost tabHost; private void setupTabhost() { tabHost=(TabHost)findViewById(android.R.id.tabhost); tabHost.setup();
I have a TabActivity that has a TabHost with two tabs. Each tab has
I have a problem: Java Code public class VisualizzaListaActivity extends TabActivity { /** Called
I'm developing a tab based android application,I have seen that TabActivity class is deprecated
I have TabActivity: public class timetable extends TabActivity { ... @Override public boolean onTouchEvent(MotionEvent
I have a TabActivity with three tabs defined. The first tab is light-weight and
I have been using TabActivity and I want the tab to display on every

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.