title: Android - Load image from drawable to ViewPager
body: <p>I have a ViewPager include three pages. Each page, it has a ImageViews, and I will load images from drawable set to it later. </p>
  
  <p>This is my code: </p>
  
  <p>On Fragment: </p>
  
  <pre><code>@BindView(R.id.viewPager)    
  ViewPager mViewPager;
  
  ...
  
  private List&lt;Integer&gt; getIntroResourceIds() {
      List&lt;Integer&gt; introResourceIds = new ArrayList&lt;&gt;();
      introResourceIds.add(R.layout.layout_intro_step1);
      introResourceIds.add(R.layout.layout_intro_step2);
      introResourceIds.add(R.layout.layout_intro_step3);
      return introResourceIds;
  }
  </code></pre>
  
  <p>On each layout intro, I have a <code>ImageView</code> with the different id. Such as in <code>layout_intro_step_1</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:weightSum="10"&gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_gravity="center"
          android:layout_weight="3"&gt;
  
          &lt;ImageView
              android:id="@+id/quickpay_intro_step3_image"
              style="@style/IntroImage" /&gt;
      &lt;/FrameLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The problem is, I can't set the images view for each layout intro when user click next page. Please help me this problem. </p>