Are you sure? This sounds like exactly what I was asking earlier today, based on my experience with Spinner. I speculated that ListView might exhibit the same behavior.
You describe the behavior I was expecting. Instead, the Spinner ignored all constraints. If I put it first in the layout, it would overlay or squeeze out the text. (I forget what distinguished the two behaviors). If I put it second, the text would fail to wrap and the Spinner would get squeezed out. I just could not get the Adapter-supplied views to participate in the sizing process. I expect that I could have given it a fixed size, but that would be a bug itself. I don't have time to try it again with ListViews at the moment, but if anyone can confirm this working, especially with RelativeLayout, I'd appreciate it. On Mar 11, 10:35 am, Brion Emde <brione2...@gmail.com> wrote: > You can totally do this. > > Make sure that your TextView is set to > android:layout_height="wrap_content" and not to "fill_parent". That > will surely do what you are describing. > > --- > > On Mar 11, 5:35 am, Pipen <erik.ing...@gmail.com> wrote: > > > > > Dear All, > > > I've tried to add a TextView before a ListView in a LinearLayout. The > > result is that the ListView wont show at all. The same thing happens > > if I put the TextView after the ListView, but then I will only see the > > ListView. > > > Is there a way to get a text view above the ListView without to much > > of a hassle? > > > Kind regards -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en