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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:27:10+00:00 2026-05-21T18:27:10+00:00

Is it possible to show a FragmentDialog when a tab is selected in the

  • 0

Is it possible to show a FragmentDialog when a tab is selected in the ActionBar?

The onTabSelected() method happens inside a transaction that is commited after the execution of the method finishes. However, the show() method in DialogFragment does also happen in a transaction automatically, so if you try to show the dialog when the tab is selected you get a RuntimeException because the transaction gets commited twice.

Any hints will be appreciated.

  • 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-21T18:27:11+00:00Added an answer on May 21, 2026 at 6:27 pm

    Just ignore the supplied FragmentTransaction.

    For example, you need to do this if you are using the Android Compatibility Library (ACL), because the FragmentTransaction you get from the action bar is an Android 3.0 FragmentTransaction, not an ACL FragmentTransaction. So, you ignore the passed-in one and use your own.

    Similarly, I would expect that you can ignore the FragmentTransaction and display a DialogFragment yourself without problems.

    Whether the UX will make any sense is another problem. When the user accepts the dialog the tab shows… nothing?

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

Sidebar

Related Questions

Possible Duplicate: Is it possible to show a Facebook app as a Page Tab
Is it possible to show toolbar items in a UIViewController inside a popover? I'm
Is it possible to show a video that is playing onto an existing application?
Possible Duplicate: Show activity indicator during application launch All, Inside my app delegate, I
Is it possible to show an alertview with a textbox inside like the AppStore
Is it possible to show a webpage inside of an AIR app?
How is possible show an intro view for 5 seconds, to show after another
Possible Duplicate: show a login screen before Tab bar controller? i am designing an
Possible Duplicate: show a login screen before Tab bar controller? i am designing an
Is it possible to show a list of applications (with intent.createChooser ) that only

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.