• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps android gallery item background

faisalloe

Newbie
I am using gallery widget
adapter getview is some thing like following

Code:
public View getView(int position, View convertView, ViewGroup parent) {
            ImageView i = new ImageView(mContext);
            i.setScaleType(ImageView.ScaleType.FIT_XY);
            i.setLayoutParams(new Gallery.LayoutParams(42, 38));
            CategoryRow catRow = getItem(position);
            i.setImageResource(catRow.getUnSelectedImgSrc());
            i.setTag(catRow);
            return i;
        }
gallery.setSelection(adapter.getCount()/2, true);

I have 2 images for every item one for normal one for selected and also will be used for center item in gallery.

how can i use these two images for center or selected image and for normal image.

when gallery displays center item is highlighted but when i start moving gallery center item not getting highlighted

6a63d1f2ba.jpg
 
Back
Top Bottom