getView from CustomizedAdapter called several times

by Ola Ingvaldsen » Thu, 23 Jul 2009 16:20:32 GMT


Sponsored Links
  am having the same problem. In my case it only happens if I specify my own
layout using setContentView in onCreate() of my ListActivity. If i use the
standard layout i get correct number of calls to getView.

The thing is that if I have 5 items in my list i suspect the first 5 calls
to getView to have convertView=null each time. But its not. First time its
null, then the next 5 calls have the same convertView as the previous call
and then 5 more calls where the convertView is null. So the first 6 calls
to getView only results in changing the first element 5 times more than
whats necessary. After the 5 first calls the convertView is null and the
rest of the items in the list are filled out correctly. But when i scroll
down the list, we have 10 more calls again.

Does anybody have an idea whats wrong? Or how it can be avoided?

I have no weights in my layout at all. Its just a simple textView with a
status message and a listView.

-Ola

On Wed, Jul 15, 2009 at 4:05 PM, Streets Of Boston
<flyingdutc...@gmail.com>wrote:


--~--~---------~--~----~------------~-------~--~----~



getView from CustomizedAdapter called several times

by Romain Guy » Thu, 03 Sep 2009 00:02:37 GMT


 here's nothing wrong with this, it can (and it will in some
situations) happen. getView() is not guaranteed to be called exactly
once per item. It happens for instance when you set the list/grid with
a height=wrap_content.

On Wed, Sep 2, 2009 at 5:32 AM, Guitou<drumsensati...@gmail.com> wrote:



--
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support. All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Web apps for Android Browser

For those that may want to take a pure web application approach to
making something that works well on Android's browser, note that the
iPhone web app framework called iUI seems to work perfectly well on
Android.  iUI is a library of javascript and CSS that allows you to
quickly make apps that work well on a mobile browser.

you can download the library from here.
http://code.google.com/p/iui/

I tested various iUI web apps like my http://imoviemash.com and
http://imusicmash.com on an Android phone at the t-mobile shop last
weekend.  They worked perfectly fine, and actually seemed to run a bit
faster on the Android browser as compared to the iPhone browser.

Check out imusicmash.com if you'd like to take your iTunes library
(err, just your artist and song list) with you on Android :)   The
links launch the native YouTube video player, just like on iPhone.

has anyone seen a similar  group to the iphonewebdev discussion group
but for Android's browser?

2. haha

so, posts critical of this dev env don't show up

nice control there google


--~--~---------~--~----~------------~-------~--~----~

3. error: write failure during connection

4. Android Workers

5. get Bitmap for a Canvas?

6. sharedUserId - What does it mean wrt to Java classes?

7. Android Dev Camp (Dallas)