views:

29

answers:

1

Hi friends,

I want to show a ListView with two Buttons belows (outside of list) it. But as my Activity extends ListActivity, I am facing problems on setContentView. Can anybody please help me?

Updates: Solution

I got the solution. No matter which and how many elements we use on a ListActivity, the id (android:id) of ListView in XML file must be @android:id/list. :-)

A: 

Can you post your layout XML?

Basically if you're using Linear Layouts the hierarchy will be as such

LinearLayout (orientation:vertical)
   |---ListView (layout-weight:1)
   |---LinearLayout (used for buttons)
            |-- Button 1
            |-- Button 2

If you show me you XML I can show you what you need to do..Unless the above snippet helps you fix it of course ;-)

Dave