Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That view is fairly straightforward, and performancewise should be no problem at all as long as you use a <a href="http://developer.android.com/reference/android/widget/ListView.html" rel="nofollow"><code>ListView</code></a> with a <a href="http://developer.android.com/reference/android/widget/ListAdapter.html" rel="nofollow"><code>ListAdapter</code></a> that properly utilizes view recycling and the holder pattern (see the Android API Demos List14 demo for a <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html" rel="nofollow">good example</a> of that). That means your row view will only be inflated (the expensive part) a few times, and after that you'll simply be populating an existing row that has moved off screen with new information to be rerendered, so in reality there end up being only 6 or 7 instances of your row view in memory, not 40.</p> <p>Caveats: Make sure you're not doing anything that blocks the UI thread in your adapter's view inflation/population, like loading an image from the network or making random expensive SQLite queries, since this will noticeably affect experience during scrolling. Most of that sort of work should be done in background threads, usually with a delay to not kick off mid-scroll (see Brad Fitzpatrick's <a href="http://www.youtube.com/watch?v=c4znvD-7VDA" rel="nofollow">2010 IO talk</a> for more on that).</p> <p>I highly reccommend watching Romain Guy's presentations from Google I/O <a href="http://www.google.com/events/io/2009/sessions/TurboChargeUiAndroidFast.html" rel="nofollow">2009</a>/<a href="http://www.youtube.com/watch?v=wDBM6wVEO70" rel="nofollow">2010</a> on UI speedups mostly relating to ListView to all Android developers. The 2009 one is a bit old (Cupcake era) but both have lots of goodies on listviews and view recycling and some real-world benchmarks on the benefits, and some other less-obvious performance killer warnings (like "don't allocate objects in your adapter's getView()" -- causing GC is bad.)</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