title: How to call fragment which is in view pager from different Activity?
body: <p>I have 3 pages which associated with activity and view pager. Now I have build it like my activity -> A-B-C fragment. In my activity I have called view pager adapter code for pager is given below:  </p>
  
  <pre><code>public class ViewPagerAdapter extends FragmentPagerAdapter 
  {        
      final int PAGE_COUNT = 3;
      // Tab Titles
      private String tabtitles[] = new String[] { "Tab1", "Tab2", "Tab3" };
      Context context;
  
      public ViewPagerAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @Override
      public int getCount() {
          return PAGE_COUNT;
      }
  
      @Override
      public Fragment getItem(int position) {
          switch (position) {
  
              // Open FragmentTab1.java
          case 0:
              HomeFragment fragmenttab1 = new HomeFragment();
              return fragmenttab1;
  
              // Open FragmentTab2.java
          case 1:
              CameraFragment fragmenttab2 = new CameraFragment();
              return fragmenttab2;
  
              // Open FragmentTab3.java
          case 2:
              FriendsFragment fragmenttab3 = new FriendsFragment();
              return fragmenttab3;
          }
          return null;
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          return tabtitles[position];
      }
  }
  </code></pre>
  
  <p>Now, I want to call c fragment from A but, it should be new instance of fragment, and also I want to call frag B from some of my activity... for that also how to start new instance of fragment.....</p>