I've been trying to add a linear layout to a listview header. The
listview appears fine and is working as expected, but when i try to
add a linearlayout to the header i get a java.lang.ClassCastException:
android.view.ViewGroup$LayoutParams occuring at the list.addHeaderView
(ll); line. I thought it might be something in the complex layout i
had so i switched it to just a linearlayout with a colored background
and still got the same error. The end result i an trying to get is a
list with a header that is all scrollable. any help would be greatly
appreciated

Thanks


_list = new ListView(this);

LinearLayout ll = new LinearLayout(this);
ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, 100));
ll.setBackgroundColor(Color.CYAN);
_list.addHeaderView(ll);

_list.setAdapter(_adapter);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to