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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:57:40+00:00 2026-06-13T22:57:40+00:00

My question looks similar to this . However, it is a bit more in

  • 0

My question looks similar to this. However, it is a bit more in general:
Let me try to explain: I am using the ActionBarSherlock with the Tabsadapter and Viewpager. I have replaced all the fragments with my own and now I have a button in one of my fragments which, when clicked on, starts the following onclick handler:

public void onAcceptSelected() {

    SherlockFragment addFirstChildFragment = AddChildFragment.newInstance();
    getSupportActionBar().setTitle("The new title of the fragment here");
    FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
     ft.replace(R.id.pager, addFirstChildFragment);
     ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
     ft.addToBackStack(null);
     ft.commit();

}

The problem is then that the following method in the new fragment:

public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
     View v = inflater.inflate(R.layout.fragment_childeditor, container, false);
    return v;
 }

does not result in actually providing a new visible layout: the tab its contents are empty (e.g. I see a holo white themed empty tab).

Now I have the following questions:

My main question is: “How should I replace fragments within a tab?”
with subquestions:

  1. Should I adapt the XML of the Tabs and Pager example and fit it with fragment containers?
  2. What is the best practice for using tabs and a viewpager with many fragments? Because I want to use the tabs as my main navigation, but I will have plenty of different fragments.
  • 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-13T22:57:41+00:00Added an answer on June 13, 2026 at 10:57 pm

    The answer resides in the answers to this question
    Actionbarsherlock + tabs + multi fragments?

    Answers to my questions are:
    1. No this is not necessary: I can add them programaticllay.
    2. I can use fragmentstacks as the example shows in the link above.

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

Sidebar

Related Questions

Now this question looks similar to the question I've asked here , however, this
i have a table which looks similar to this <asp:TableRow><asp:TableCell>Question 1</asp:TableCell><asp:TableCell ID =Question1Text></asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell
This question is very similar to this one . However, the accepted answer (and
Disclaimer: I tried to search for similar question, however this returned about every C++
Similar to this question, my HTML looks like this: <body id=body onload=loader()> </body> I
I am using an approach similar to T. Stone's answer on this question .
Okay guess this question looks a lot like: What is the best way to
EDIT: In case the question below looks a bit 'extensive', the summary is that
It looks like this question has been asked dozens of times, but none of
Looks like this question has been asked thousand times already, but each person's configuration

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.