Hi All,

I am attempting to load a series of images into a 3x3 gridview.  When the
user refreshes the screen I want images to load into each imageview
randomly.  All of the images load properly - except index zero (topmost
leftmost).  In testing, this will work the first time I load if zero happens
to be the first index randomly picked - but thereafter - nothing.  I suspect
the trouble is in how I am dealing with getView within the BaseAdapter.
Here is what I have:

        public View getView(int position, View convertView, ViewGroup
parent)
        {
            ImageView imageView = (ImageView)convertView;

            if (convertView == null) {
                imageView = new ImageView(context);
                imageView.setLayoutParams(new GridView.LayoutParams(85,
85));
                imageView.setScaleType(ImageView.ScaleType.FIT_XY);
                imageView.setPadding(1, 1, 1, 1);
                imageView.setOnClickListener(ShowArtistSummary);
                imageView.setAnimation(anim_fade_in);

            } else {
                imageView = (ImageView) convertView;
            }

            imageViews[position] = imageView;
            return imageView;
        }

The imageViews array is used later to load the bitmaps randmly.

Help appreciated.

j

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to