Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Out of curiosity, is your layout using RelativeLayout? If so, calling <code>measure(0,0)</code> will always throw an NPE, but a LinearLayout will not. <a href="http://groups.google.com/group/android-developers/browse_thread/thread/5a947482d7dcb605" rel="nofollow">http://groups.google.com/group/android-developers/browse_thread/thread/5a947482d7dcb605</a></p> <p>Change it to Linear and you can make that call. I hope that helps!</p> <hr> <p>I have a situation in my app where I have paragraphs of text, imageviews, all sorts of information on a given subject...and then, depending on the item, there is <em>possibly</em> a ListView of comparison data in the middle of all of that info. About one in every 10 items has it, nestled between all the text. The comparison data is never more than 4 items at max, so I don't <em>want</em> the ListView to scroll, ever. I just want the ListView to appear in its entirety at the exact point I specify.</p> <p>Adding them all as nested Linear Layouts is insane, so is using MergeAdapter to put all of that together when I may not even have a ListView on screen. And using complex ListView headers &amp; footers is out of the question as well.</p> <p>I'm not the first person to want that kind of functionality, and I won't be the last. The above solution is nearly perfect, it sizes my ListView so that it's full on screen, and all the scrolling comes from the ScrollView parent. (It's easy as sin to do on the iOS SDK, btw., and a lot of apps over there do similar things; we'll need a good solution for this.)</p>
 

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