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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:10:41+00:00 2026-06-12T09:10:41+00:00

I have 2 panes in my tablet. left one is List, right one will

  • 0

I have 2 panes in my tablet. left one is List, right one will display details of each list item based on selection. In my right pane I have sequence of Fragments to be displayed for each selected list item. The problem is when I click second fragment in the sequence, It has to display Third fragment, However it is displaying first for few seconds and then it is going to show third fragment.
All this is in Second PANE
It is like in Second Pane for 1 item
Click on 1 fragment -> Display 2 fragment-> Click on 2 fragment-> DISPLAY 1(for few seconds) -> Display 3 fragment->

But It should be like
Click on 1 -> Display 2 -> Click on 2 -> Display 3 ->

I need to do something which make the Fragment stack set right

Please check the below code

@Override
public void onListItemClick(ListView l, View v, int position, long id) {
    super.onListItemClick(l, v, position, id);

    if (selected_item != null)
        if (selected_item != v) {
            if (selct_item_bg_color != 0)
                selected_item.setBackgroundColor(Color
                        .alpha(selct_item_bg_color));
            else {
                int rgb = Utill.hex2decimal("D2");
                //int rgb3=Utill.hex2decimal("82");
                selected_item.setBackgroundColor(Color.rgb(rgb, rgb, rgb));
                //selected_item.setBackgroundColor(Color.GRAY);
                Log.e("", "DEFAULT NOT SELECTED");
            }
        }
    selected_item = v;
    selct_item_bg_color = v.getDrawingCacheBackgroundColor();


    selected_item.setBackgroundDrawable(v.getContext().getResources()
            .getDrawable(R.drawable.list_selector));
    Log.e("POSITION", "SELECTED ITEM POSITION : " + position);

    FragmentManager frMgr = this.getFragmentManager();
    FragmentTransaction xaction = frMgr.beginTransaction();
    switch (position) {
    case 0:
        ScheduleFragment sc_fragment = new ScheduleFragment();
        xaction.add(R.id.second_pane, sc_fragment, "itinerary");
        xaction.commit();
        break;
    case 1:
        ItineraryFragment it_fragment = new ItineraryFragment();
        xaction.add(R.id.second_pane, it_fragment, "itinerary");
        xaction.commit();
        break;
    case 2:
        VenueFragment vn_fragment = new VenueFragment();
        xaction.add(R.id.second_pane, vn_fragment, "Venue");
        xaction.commit();
        break;
    case 3:
        Bundle sendData=new Bundle();
        sendData.putString("URL", URL+utilclass.getMyDbHelper().getToken());
        sendData.putString("TITLE", "Search");
       //intent.putExtra("URL", URL+utilclass.getMyDbHelper().getToken());
        //intent.putExtra("TITLE", "Search");

        SearchWebFragment sw_fragment = new SearchWebFragment();
        sw_fragment.setArguments(sendData);
        xaction.add(R.id.second_pane, sw_fragment, "searchWeb");
        xaction.commit();
        break;

    default: Log.e("","Please Choose Right option");

    }
  • 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-12T09:10:42+00:00Added an answer on June 12, 2026 at 9:10 am
        I make it done by setting transaction to close using the below statement
    
        transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE);
    
    
       used as: 
    
        FragmentTransaction transaction = getFragmentManager().beginTransaction();
        Fragment frag=new AbstractAuthorsFragment();
        transaction.replace(R.id.second_pane, frag);
        transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE);
        transaction.addToBackStack(null);
        transaction.commit();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several pages to do with several table on each page. I've got
I have a table of pages in my database, each page can have a
I have a site with multiple pages, and each page has a table that
I have three panes with the InfoPane center option. I want to know how
I have a problem with Core Data which has left me at the end
I have a section of an html page that I want to display in
I have a table of one row with two columns.I want to align content
I've got seven Panels (that each one of them holding another 5 Panels) that
I currently have two tables, one for pages (objects) and one for images (media).
How are you all, hope every one here is OK, now I have a

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.