GridView
Login to reply to this topic.
Tue, 2008-09-23 07:25
Joined: 2008-06-04
Forum posts: 3

Hi,

I m displaying all files with actual images in a list view. I have an option that would display those files in a grid view with actual images. When i m trying to change the view to gridview , its not displaying actual images of all the files in the grid view instead it is displaying only three and i m creating the grid view and list view dynamically

If it is a decoding problem then it shouldn't decode the first three files as well.

Here is the code snippet which I used for decoding image.

TRAP(error, iDecoder = CImageDecoder::FileNewL(iFs, aFileName););
if (error!=KErrNone)
{
return error;
}

// Get image information
iFrameInfo = iDecoder->FrameInfo(aSelectedFrame);

iBitmap = new (ELeave) CFbsBitmap;
TSize Size = TSize(40,30);
//iBitmap->Create(Size, EColor16M);

iBitmap->Create(iFrameInfo.iOverallSizeInPixels,iFrameInfo.iFrameDisplayMode);

// Decode as bitmap.
iDecoder->Convert(&iStatus, *iBitmap, aSelectedFrame);

This code is working fine while displaying actual images in ListView.But failed in grid view.

.....i got stuck up with this problem....can any one help me out???

Thanks in Advance,
Rams.


Tue, 2008-09-23 14:30
Joined: 2003-01-14
Forum posts: 2133

The problem doesn't seem to be in your image decoding then.... how do you handle the switch between the list and the grid ?


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Wed, 2008-09-24 06:32
Joined: 2008-06-04
Forum posts: 3


Thanks for the reply,

for switching b/w list and grid view we have a toggle command for the view . when user selects this command we will check whether list or grid is active, based on that we will create the other control on the display.

Here we have diff. pointers for list and grid view and based on the user request we are caling draw method respectively.

As u said if it is not problem with image deconding where could be the problem???


copyright 2003-2009 NewLC SARL