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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:45:43+00:00 2026-06-13T02:45:43+00:00

I am trying FragmentActivity instead of TabActivity in Android 2.2 . Following is the

  • 0

I am trying FragmentActivity instead of TabActivity in Android 2.2. Following is the test layout of page.

Layout

I am loading fragments run time using FrameLayout as container. Suppose clicking on B1 button I am loading a Fragment F1, clicking on a button in F1 Fragment loads another Fragment F2 in FrameLayout container. Now the problem is while in Fragment F2 and clicking on blank UI of the fragment, I am getting events of buttons that are placed in Fragment F1 on the exact location of click.

  • 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-13T02:45:44+00:00Added an answer on June 13, 2026 at 2:45 am

    Actually I made mistake while adding new fragment, I used Add() method of FragmentTrasaction class. Instead of this method we should use Replace() method. Becuase Add() method would add your fragment to the life cycle of the containing activity. The result of this would be if you add one fregment above the other, then previous Fragement would receive click events.

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

Sidebar

Related Questions

I'm not using a ListActivity because I want to extend FragmentActivity. Instead I'm trying
Trying to generate a simple ActivityUnitTestCase to test various Fragments in my Android code.
It's small Android 2.2 test application using the Compatibility Package. This is the (wrong,
I am trying to inflate a layout containing a Fragment using the backwards compatibility
I'm trying to use FragmentActivity with ViewPager to display dynamic list of Fragments .
I've been trying to complete tutorial Working with fragments which was designed for android
I'm currently trying to adapt my application to use the Compatibility Libraries for Android
What am I trying to implement? A gallery of images using ViewPager. I choose
I have a FragmentActivity as my main activity. I am trying to call up
I am trying to use a Fragment in a FragmentActivity like so: TutViewerFragment viewer

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.