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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:57:19+00:00 2026-05-20T23:57:19+00:00

I start with a home fragment that opens either a listFragment(Al) or I can

  • 0

I start with a home fragment that opens either a listFragment(Al) or I can choose a normal Fragment(Jim). If my new Fragment(Bob) is called from the listFragment(Al), I want Fragment(Bob) to call XML A. If Fragment(Bob) is called from Fragment(Jim) I want Fragment(Bob) to inflate XML B. How do I pass a value from listFragment(Al) and Fragment(Jim) that can be checked in the onCreateView of Fragment(Bob) so that Fragment(Bob) knows which XML to inflate?

Hope that all makes sense.

Thanks.

  • 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-20T23:57:20+00:00Added an answer on May 20, 2026 at 11:57 pm

    Use get/set arguments:
    http://developer.android.com/reference/android/app/Fragment.html#getArguments()

    [edit]

    So when you create Fragment Bob from Fragment Jim you could do something like this:

    Bob b = Bob.newInstance();
    Bundle bundle = new Bundle();
    bundle.put("resourceId", R.id.XMLB);
    b.setArguemnts(bundle);
    

    or you could even in the newInstance method take in the resourceId

    Bob b = new Bob.newInstance(R.id.XMLB);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I start installing boost libraries, ACE framework and use it as my home
My application has two activities, that I start in this order: HOME > A
I create a new project and start it. It turns out that the controller
I've written following class to start my application activity Home.class but on device start
I have a home-screen widget that has an icon that starts/so pose to bring
Java Exception: http://hastebin.com/yiwecefifi.avrasm I have an object, that I call Category, that my fragment
To start Diaspora sever need to run these command: cd /home/diaspora ./script/sever My server(Ubuntu
Whenever I start my console gnome-terminal in Ubuntu, it starts in the home directory.
I have such bash script start.sh: export JAVA_HOME=/home/qds/bin/jdk1.6.0_22 export QDS_HOME=/home/qds $JAVA_HOME/bin/java -classpath $QDS_HOME/lib/*:$QDS_HOME/lib/commons/* com.qds.Main
When I start the application crashes following error /home/stereodenis/.rvm/gems/ruby-1.9.3-p194@nyanya/gems/haml-3.1.6/lib/haml/helpers/action_view_mods.rb:15:in `alias_method': undefined method `render' for

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.