Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have a similar thing in my application, except I only have json backed ListView and I also have about 30 items in it (with data constantly changing and animation playing to reflect changes). It would be much more easier to detect a problem with some provided code from your side, but here are couple of tricks you can sue for optimization.</p> <ol> <li>Reuse convertView that is passed to you as one of the parameters in getView method, it really speeds up the scrolling.</li> <li><p>Either create your own row view (by extending some layout, or ViewGroup), or use setTag on a row you return form your getView method. In this tag, you should keep an object that contains references to views in that row, so you wont be searching for them with findViewById everytime a row is requested. Object can be a simple static class like </p> <p><code>private static class ViewHolder {</p> <pre><code> ImageView image; TextView text; </code></pre> <p>}</code></p></li> </ol> <p>On the first time (when the convertView is null and you need to create a fresh row) you just create instance of your ViewHolder and set those parameters to refer to parameters from your newly created row (by calling findViewById), and put this instance in row's setTag method. Next time, when you reuse convertView, just call getTag and in the tag you recieved you'll get references to views in that row, so you won't be needing to call findViewById anymore.</p> <p>Of course, you might already done all those things.</p> <p>P.S. I advice you (if you haven't already) to watch Google I/O presentation about ListView's. A lot of useful information there: <a href="http://www.youtube.com/watch?v=wDBM6wVEO70" rel="nofollow">http://www.youtube.com/watch?v=wDBM6wVEO70</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload