• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Same Fragments in FragmentPageAdapter

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing an ExpenseManager app in android, where i am implementing a fragmentActivity. This fragment shows the account summary page with details such as Account Balance, Account Last Transaction Amount and other details.

The AccountSummary Activity is a multi tab activity implemented with ViewPager, ActionBar, FragmentPageAdapter and FragmentActivity.

The layout of summary page will be common for all the accounts and only the data will get changed depending which account user has selected.

Now i want to implement this activity where i can reuse/ duplicate the same fragment layout (not the instance) across all the accounts or (ActionBar Tabs). so when the user selects any tab from actionBar, it should load/show/display a fragment along with that account data.

(I know that i need to create dynamic Fragment with different TagName and need to replace with the help of FragmentTransaction. But somehow this solution doesnt works)

This is similar to the application on PlayStore with the App layout as AppImage

Could you be able to post solution with the help of example code ? As i have been struggling to find solution but to no use.

Thanks in advance
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This isn't really how this site works - we don't write solutions for people, we help them get there themselves.

So tell us what, exactly, you have tried, and how, exactly, that has or has not worked. What concrete issue prevents you from making progress?
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic