title: TextView Slider with Pagination in Android
body: <p>i need to Achieve something like this in android. i don't know how can i achieve this in android. i have already checked <a href="http://www.androidhive.info/2016/05/android-build-intro-slider-app/" rel="nofollow noreferrer">this</a> but it is a full screen slider with images and all. i just need a simple text slider with several slides in the middle of the screen not full screen.</p>
  
  <p><a href="https://i.stack.imgur.com/H4S8E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H4S8E.png" alt="enter image description here"></a></p>
  
  <p>i have already done that in my iOS app but i am wondering if i can do that in android app also. please do let me know how can i do this. Any Tutorial or code snippet would be great help. Thanks</p>
  
  <p>here is my code so far.
  in onCreate method:</p>
  
  <pre><code>//Set the pager with an adapter
          ViewPager pager = (ViewPager)findViewById(R.id.pager);
          List&lt;Integer&gt; objects = Arrays.asList(Color.BLUE, Color.GREEN, Color.RED);
          pager.setAdapter(new ViewPagerCustomAdapter(objects));
          //Bind the title indicator to the adapter
          ViewPagerWithIndicator viewPagerWithIndicator = (ViewPagerWithIndicator)findViewById(R.id.viewPagerWithIndicator);
          viewPagerWithIndicator.setViewPager(pager);
  </code></pre>
  
  <p>and xml</p>
  
  <pre><code>&lt;com.kassisdion.library.ViewPagerWithIndicator
          app:arrow.enable="true"
          app:arrow.width="50dip"
          app:arrow.height="50dip"
          app:left_arrow.drawable="@drawable/ic_action_arrow_left"
          app:right_arrow.drawable="@drawable/ic_action_arrow_right"
          app:round.enable="true"
          app:round.size="15dip"
          app:round.drawable="@drawable/background_rounded"
          app:round.color.default="@android:color/white"
          app:round.color.selected="@android:color/holo_blue_light"
          android:id="@+id/viewPagerWithIndicator"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
      &lt;/com.kassisdion.library.ViewPagerWithIndicator&gt;
  </code></pre>