Question: So the documentation mentions that it is better to install from source, then build a pip package. Why is this recommended over doing a direct pip install using the wheel file provided on the downloads page? [here](https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#pip-installation) 

I tried the direct pip install and then runnning some scripts in the inception folder.This results in errors with bazel not finding some of the dependencies. I am guessing this is related to not building tensorflow from source, but I can't figure out why this is the case. Any pointers? Thanks!

Answer: 
Oh, you need to inflate a custom layout containing an `ImageView` and a `TextView` below it (or any other arrangement you may need). Then modify your `PagerAdapter` to inflate this custom layout with the image and the text. This is just to give you a better idea. 

```
@Override
    public Object instantiateItem(ViewGroup container, int position) {
      Context context = container.getContext();      // I feel this is a better implementation
      CustomLayout layout = new CustomLayout(context);   

      // This is a custom layout that you could create
      // you could init a LinearLayout and add an 
      // ImageView and a TextView to it, your call :)

      // Set image and text in your view accortind to 'position'

      return layout;
    }

```
Try this way,you need to create array for texts,

```
private int imageArr[] = { R.drawable.f, R.drawable.g, R.drawable.h,
                              R.drawable.i, R.drawable.j};  

private String[] stringArray = new String[] { "first", "sec","third","fourth","fifth"};

```

initialize your adapter

```
adapter = new ImagePagerAdapter(this, imageArr, stringArray );

```

make your adapter like

```
int imgArray [];
String[] stringArray;
public ImagePagerAdapter(Activity act, int[] imgArra, String[] stringArr) {
    activity = act;
    imgArray = imgArra;
    stringArray = stringArr;
}

```

then get the position

```
txt.setText(stringArray[position]);

```

See [this](http://www.androidbegin.com/tutorial/android-viewpager-gallery-images-and-texts-tutorial/) for more