According to Romain Guy, Gallery doesn't actually recycle views:

http://groups.google.com/group/android-developers/browse_thread/thread/9a9be423fcdadb98

So what you're seeing is expected behavior.

It's probably not good, but at least there is nothing mysterious about it.

-- Kostya

17.11.2010 22:50, Streets Of Boston пишет:
I assume you have a 'convertView = yourInflatedView' within the 'if
(convertView == null) { }' block, since it works on a ListView.

How many items do you show in the Gallery widget? If it's only a few,
the convertView may never really non-null for these few items.

However, if 'getView(...)' is called over and over again, on every
scroll with 'convertView == null', then it looks like there is a
problem indeed.. :)

On Nov 14, 5:22 am, siva prasad<[email protected]>  wrote:
Hi all,
I have made customAdapter (which extends BaseAdapter). I want to reuse
the old views..So I am checking

@Override
public View getView(int position, View convertView, ViewGroup parent)
{
    ViewHolder holder1;
    if (convertView==null)
    {
         // Inflating it from the layout.. Creating new view
        // Setting tag
    }
    else
    {
        // Getting tag.. reusing view
    }
    return converView;}

  I set the same to my gallery widget. Here I am getting the problem..
convertView what I am getting everytime when scrolling is always
null..So I am everytime creating the new one..
The same adapter is working perfectly fine with the listView.  Please
help me to fix this ?
will be waiting for the reply. Thanks.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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