title: How to add page in sliding tab layout in Xamarin Android
body: <p>I need to add some page in each tab from Sliding Tab Page Layout Xamarin Android, I Already make the sliding tab layout it works but i cant change the page for each tab here is my code Fragments Code :</p>
  
  <pre><code>public class SlidingTabsFragment : Fragment
      {
          private SlidingTabScrollView mSlidingTabScrollView;
          private ViewPager mViewPager;
  
          public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
          {
              return inflater.Inflate(Resource.Layout.fragment_sample, container, false);
          }
  
          public override void OnViewCreated(View view, Bundle savedInstanceState)
          {
              mSlidingTabScrollView = view.FindViewById&lt;SlidingTabScrollView&gt;(Resource.Id.sliding_tabs);
              mViewPager = view.FindViewById&lt;ViewPager&gt;(Resource.Id.viewpager);
              mViewPager.Adapter = new SamplePagerAdapter();
  
              mSlidingTabScrollView.ViewPager = mViewPager;
          }
  
          public class SamplePagerAdapter : PagerAdapter
          {
              List&lt;string&gt; items = new List&lt;string&gt;();
  
              public SamplePagerAdapter() : base()
              {
                  items.Add("Nasional");
                  items.Add("Olahraga");
                  items.Add("Internasional");
                  items.Add("Hiburan");
                  items.Add("Sains");
                  items.Add("Ekonomi");
              }
  
              public override int Count
              {
                  get { return items.Count; }
              }
  
              public override bool IsViewFromObject(View view, Java.Lang.Object obj)
              {
                  return view == obj;
              }
  
              public override Java.Lang.Object InstantiateItem(ViewGroup container, int position)
              {
                  View view = LayoutInflater.From(container.Context).Inflate(Resource.Layout.pager_item, container, false);
                  container.AddView(view);
  
                  TextView txtTitle = view.FindViewById&lt;TextView&gt;(Resource.Id.item_title);
                  int pos = position + 1;
                  txtTitle.Text = pos.ToString();
  
                  return view;
              }
  
              public string GetHeaderTitle(int position)
              {
                  return items[position];
              }
  
              public override void DestroyItem(ViewGroup container, int position, Java.Lang.Object obj)
              {
                  container.RemoveView((View)obj);
              }
          }
      }
  </code></pre>
  
  <p>and what i want in here is to make each tab is redirect to another page that i make, and here is the example of my page</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
      &lt;android.support.v7.widget.Toolbar
          android:id="@+id/toolbar"
          android:minHeight="?attr/actionBarSize"
          android:background="?attr/colorPrimary"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:titleTextColor="#333639" /&gt;
      &lt;android.support.v7.widget.RecyclerView
          android:padding="8dp"
          android:id="@+id/recyclerView"
          android:layout_below="@id/toolbar"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>