8

Why does my ViewPager have children of zero width and height?

view full story
linux-howto

http://stackoverflow.com – I'm making a ViewPager to display a series of images, which are identified by their position in an array of resource values. Here is my instantiateItem code for the adapter: //indexes the images @Override public boolean isViewFromObject(View arg0, Object arg1) { return arg0.getTag().equals(arg1); } //serves the views @Override public Object instantiateItem(ViewGroup container, int position) { ImageView view = new ImageView(container.getContext()); view.setScaleType(ScaleType.FIT_CENTER); view.setTag(position); view.setImageResource(mImages.get(position)); container.a (HowTos)