title: Add RecyclerView to Tabs Fragment with ViewPager
body: <p>i have a simple fragment with 2 tabs and i want to add a recyclerview in each fragment. my question is how can i attach the recyclerview to each fragment ?
  this is my MainAdapter</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
    private List&lt;ListMenu&gt; menuList = new ArrayList&lt;&gt;();
    private RecyclerView recyclerView;
    private MenuAdapter mAdapter;
    @Override        
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  
      TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
      tabLayout.addTab(tabLayout.newTab().setText("SINGLE"));
      tabLayout.addTab(tabLayout.newTab().setText("PACKET"));
      tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
  
      final ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
      final Pageradapter adapter = new Pageradapter(
                       getSupportFragmentManager(), tabLayout.getTabCount());
      viewPager.setAdapter(adapter);
      viewPager.addOnPageChangeListener(
                      new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
      tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
        @Override
        public void onTabSelected(TabLayout.Tab tab) {
          viewPager.setCurrentItem(tab.getPosition());
        }        
        @Override
        public void onTabUnselected(TabLayout.Tab tab) {}
        @Override
        public void onTabReselected(TabLayout.Tab tab) {}
        });
    }
  }
  </code></pre>