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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:22:20+00:00 2026-05-28T07:22:20+00:00

I have a customized TabView which displays a ListActivity , but everytime I click

  • 0

I have a customized TabView which displays a ListActivity, but everytime I click one of the list item, it leads to a new activity and the TabView is completely gone.

What I want is, when I click one of the item on the list, the new activity is displayed and still stays inside the tab.

Can anybody help me improve my code?

Here’s my code for the customized TabView:

super.onCreate(savedInstanceState);
    // construct the tabhost
    setContentView(R.layout.project_tab);

    setupTabHost();

    setupTabL(new TextView(this), "Alle", (ProjectsList.class));
    setupTab(new TextView(this), "Kategorien", (CategoryList.class));
    setupTabR(new TextView(this), "Favorites", (ProjectsList.class));

    final Button refresh = (Button) findViewById(R.id.btn_project_refresh);
    refresh.setOnClickListener(refresh_listener);
}

private void setupTab(final View view, final String tag, final Class<?> context) {
    View tabview = createTabView(mTabHost.getContext(), tag);
    TabSpec ts1 = mTabHost.newTabSpec("tab1"); 
    ts1.setIndicator(tabview); 
    mTabHost.addTab(ts1);
}

private static View createTabView(final Context context, final String text) {
    View view = LayoutInflater.from(context).inflate(R.layout.inner_tab_m_bg, null);
    TextView tv = (TextView) view.findViewById(R.id.tabsText);
    tv.setText(text);
    return view;
}

and this is the onListItemClick snippet from the ListActivity‘s code:

protected void onListItemClick(ListView l, View v, int position, long id) {
        super.onListItemClick(l, v, position, id);
        Object o = this.getListAdapter().getItem(position);
        String choice = o.toString();
        if (choice .equals("Entwicklungshilfe")) {
            Intent i = new Intent(CategoryList.this, SubCategoryList.class);
            i.putExtra("category","'%Entwicklungshilfe%'");
            startActivityForResult(i,0);
  • 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-28T07:22:21+00:00Added an answer on May 28, 2026 at 7:22 am

    What you are looking for is Activity Groups. Here are few examples which will get you started with it.

    ActivityGroup Example

    Android: ActivityGroup tutorial with example

    http://gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity

    http://www.devdaily.com/java/jwarehouse/android/core/java/android/app/ActivityGroup.java.shtml

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

Sidebar

Related Questions

I have one customized list MyList that extends ArrayList, like this: class MyList extends
In my magento project the search result not displays. I have customized my magento.
I have an application that has a list of buttons and has customized tooltips.
I have customized the cell with four labels, initially it looks fine but when
I have panel that I have customized. I use it to display text. But
I have customized my own colors in eclipse but cannot find where to change
I have customized UITableViewCell (Static Content Loaded from nib). This cell contains one UILable
On the List.aspx page I have customized the columns with names. And I have
I have a customized ModelBinder which bind web from with a object using code
I have customized a UITableViewCell and I want to implement swipe to delete. But

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.