sorry it was not working...
it was behaved like that error in adapter code...
here is my code..

i have toplayout,leftlayout and rightlayout..

in leftlayout  i have my grid view with thumbniles...
By clicking on any thumbnile  i am removing all views from toplayout adding
only leftlayout to it(for showing i for fullscreen)


gridView.setOnItemClickListener(new OnItemClickListener() {

@Override
public void onItemClick(AdapterView<?> arg0, View view,
int arg2, long arg3) {
System.out.println(" selected posi "+arg2);
leftSideClicked();
clickedPos = arg2;
}
});


//** This function is for present the  GridView in full screen mode and get
it back to normal size.. */
public void leftSideClicked() {
System.out.println("left side clicked....");
if (!isFull) {
topLayout.removeAllViews();
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.FILL_PARENT);
topLayout.addView(leftLayout, lp);
isFull = true;
 } else {
topLayout.removeAllViews();
RelativeLayout.LayoutParams lp1 = new RelativeLayout.LayoutParams(
640, RelativeLayout.LayoutParams.FILL_PARENT);
topLayout.addView(rightLayout, lp1);
RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.FILL_PARENT,
RelativeLayout.LayoutParams.FILL_PARENT);
lp2.addRule(RelativeLayout.RIGHT_OF, rightLayout.getId());
topLayout.addView(leftLayout, lp2);
isFull = false;
}

gridView.setSelection(clickedPos);
 }

/** this is my adapters code..

@Override
public Object getItem(int position) {
Object returnObj = null;

if (FinalPreviewActivity.isFull) {
System.out.println("returing full");
return mImages.get(position);
}
System.out.println("returing half..");
Bitmap bm = mThumImages.get(position);
if (bm != null) {
returnObj = bm;
} else {
returnObj = mImages.get(position);
}
return returnObj;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {

LinearLayout layout = null;
ImageView imageview = null;
if (convertView == null) {
layout = (LinearLayout) mInflater.inflate(R.layout.gallery_image,
null);
} else {
layout = (LinearLayout) convertView;
}
imageview = (ImageView) layout.findViewById(R.id.imageGallery);
imageview.setImageBitmap((Bitmap) getItem(position));

return layout;
}

hope my bad codding will understand...
please help me out....

2011/3/11 Clément Plantier <[email protected]>

> Let us see your code, please...
>
> On Mar 11, 7:38 am, leela <[email protected]> wrote:
> > Hi all,
> >
> > i am working on gridView which will show images..
> >
> > initially the gridView will show all thumbniles  images..
> > once click on any thumbnile i need to show that gridVeiw in full
> > screen.
> > here the problem is if user clicks on 5th image  i need to show 5th
> > image of gridView in full screen
> > But,i can't  it is always showing first image in full screen..
> >
> > please help me out..
> >
> > Thanks in advance.
>
> --
> 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




-- 
Thanks & Regards,
Leela Krishna m

-- 
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