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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:38:40+00:00 2026-06-08T02:38:40+00:00

while learning android fragments on developer.android.com it is specified that direct communication between two

  • 0

while learning android fragments on developer.android.com it is specified that direct communication between two fragment is not recommended. I want to know what will be the consequences and the cases in which communication between two Fragments would fail?

  • 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-08T02:38:42+00:00Added an answer on June 8, 2026 at 2:38 am

    Well, with Fragments you aren’t always sure if they will be alive and attached at the time of communication. Whether Fragments are attached and available or not might also depend on device layout or size. If you’re absolutely sure that your Fragments will both be attached to your activity and available at the same time, then I suppose you can communicate directly.

    Having said that, Fragments are meant to be logical, standalone units. From the docs:

    You can think of a fragment as a modular section of an activity
    

    It kind of breaks the model if the fragments are affecting each other directly.

    Why not rather define an interface in your Activity and get Fragment A to call a method in the Activity? Then your Activity can check whether Fragment B is available and can then call the appropriate function in Fragment B.

    Here is the docs suggestion

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

Sidebar

Related Questions

I've created a few minor apps for Android while learning. Being a PHP developer,
I am developing a small app while learning Android. The app is basically making
While learning an example from learn-you-a-haskell which right triangle that has integers for all
So I found some similarities between arrays and set notation while learning about sets
While learning .net (by c#) i found 5 ways for checking equality between objects.
I am learning Erlang from the LearnYouSomeErlang web-book. One thing that struck me while
I just started learning Android application development and I noticed the following issue while
I'm still learning about Android, and while playing around with TabHost and TabWidget ,
While learning C I regularly come across resources which recommend that some functions (e.g.
New to Java. Learning it while working on an Android app. I am implementing

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.