title: getSupportFragmentManager().findFragmentByTag
body: <p>first i was using FragmentPagerAdapter for which i used to get current viewpager but since i had two fragments that implemented viewpager it was conflicting with other and than i switch to FragmentStatePagerAdapter which solved the confliction from but when i try to get current viewpager it returns me null</p>
  
  <p><code>getSupportFragmentManager().findFragmentByTag("android:switcher:" + R.id.pager + ":" + viewPager.getCurrentItem())</code> </p>
  
  <pre><code>    SalesReport extends Fragment
        final ViewPager viewPager = (ViewPager) viewGroup.findViewById(R.id.pager);
  
              TabsPagerAdapter adapter = new TabsPagerAdapter(myContext.getSupportFragmentManager());
              viewPager.setAdapter(adapter);
              TabLayout tabLayout = (TabLayout) viewGroup.findViewById(R.id.sliding_tabs);
              tabLayout.setupWithViewPager(viewPager);
          TextView quantity = (TextView) viewGroup.findViewById(R.id.quantity);
  quantity.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  quantityBoolean = !quantityBoolean;
                  SalesReportList page = (SalesReportList) myContext.getSupportFragmentManager().findFragmentByTag("android:switcher:" + R.id.pager + ":" + viewPager.getCurrentItem());
                  ListView listView = (ListView) page.getView().findViewById(R.id.saleslistview);
                  SalesReportItemAdapter adapter = (SalesReportItemAdapter) listView.getAdapter();
                  adapter.sortquantiy(quantityBoolean);
              }
          });
  
      TabsPagerAdapter extends FragmentStatePagerAdapter{
       @Override
          public Fragment getItem(int position) {
  
              return  new SalesReportList().newInstance(position);
          }
      }
  
      class SalesReportList extends Fragment
       ViewGroup viewGroup = (ViewGroup) inflater.inflate(R.layout.fragment_sales_report_list, container, false);
              ListView listView = (ListView) viewGroup.findViewById(R.id.saleslistview);
              SalesReportItemAdapter listItemAdapter = new SalesReportItemAdapter(this, productType);
              listView.setAdapter(listItemAdapter);
  
  
      class SalesReportItemAdapter extends BaseAdapter 
  
          Fragment context;
          ProductType productType;
          List&lt;Sales&gt; salesList;
  
          public SalesReportItemAdapter(Fragment salesReportList, ProductType productType) {
              context = salesReportList;
              this.productType = productType;
              salesList = Myenum.INSTANCE.getSalesList(productType);
  
          }
  </code></pre>
  
  <p>returns null with FragmentStatePagerAdapter</p>