• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

how to call another fragment activity?  RSS feed

 
Ranch Hand
Posts: 1290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my main activity which contain viewpager



this is my MyFragment class




inside MainActivity there is a method respond which comes from Interface.I need to call method of MyFragment2.How to get reference tov MyFragment2 from MainActivity?
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I generally use the EventBus library for inner-app communication. That's cleaner than keeping references to GUI elements all over the place.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!