I'm implementing ViewPager to show images . (Swipe to show next and previous ). For that I've created ViewPager and have overridden necesssary methos as below. I'm dynamically creating imageviews and adding them to a LL . But on running it's just showing blank. What is problem here?

java file:

```
public class ProductView extends Activity {
// other stuff
//
ViewPager viewPager = (ViewPager) findViewById(R.id.myviewpager);
            Imageslides adaper_slideshow = new Imageslides();
            viewPager.setAdapter(adaper_slideshow);

private class Imageslides extends PagerAdapter
{

    @Override
    public int getCount() {
        // TODO Auto-generated method stub

        return imgs_url.length;  //imgs_url is an array containing all urls for images
    }

    @Override
    public boolean isViewFromObject(View view, Object object) {
        // TODO Auto-generated method stub
        return view == object;
    }

    @Override
    public Object instantiateItem(ViewGroup container, int position) {
        // TODO Auto-generated method stub

        Context context = ProductView.this;
        ImageView imageView = new ImageView(context);
        imageView.setImageResource(R.drawable.no_media);
         LayoutParams imageParams = new LayoutParams(
                    LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
         imageView.setLayoutParams(imageParams);
         LinearLayout layout = new LinearLayout(ProductView.this);
         layout.setOrientation(LinearLayout.VERTICAL);
          LayoutParams layoutParams = new LayoutParams(
            LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
          layout.setLayoutParams(layoutParams);
          layout.addView(imageView);
          container.addView(layout);
          return layout;
    }
    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {
        // TODO Auto-generated method stub
        container.removeView((LinearLayout)object);
    }
}

```

XML file:

```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context="com.example.androidviewpagerapp.MainActivity" >

<android.support.v4.view.ViewPager
    android:id="@+id/myviewpager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

</LinearLayout>

```

Any advice would be helpful.