Android Listview, again

Status
Not open for further replies.
Last time, I made a list that appeared in a tab, and all was well. Now I have one not in a tab, and it show up with this big black bar on top. The bar doesn't seem to be a header, an element, a margin, padding, or anything else, it's sort of a parasite feeding off my interface. What's the local penicillin?

Note that I'm developing for 1.5, because Motorola Backflip uses that

Thanks.
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/contactslayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:padding="0px"
    android:layout_weight="1">
    <ListView
        android:id="@+id/list"
        android:layout_marginTop="0px"
        android:padding="0px"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:cacheColorHint="#FFFFFF"
        android:background="#FFFFFF"
        android:layout_weight="1"/>
</LinearLayout>

Code:
public class Main extends Activity
{
    @Override
    public void onCreate(Bundle b)
    {
        super.onCreate(b);
//        Dialog d = new Dialog(this);
        setContentView(R.layout.dialog);
        ListView lv = (ListView) findViewById(R.id.list);
        lv.setAdapter(new nums());
//        d.show();
    }

    private class nums extends BaseAdapter
    {
        public nums()
        {
        }
        LayoutParams lp =
                new LayoutParams(LayoutParams.FILL_PARENT,
                LayoutParams.WRAP_CONTENT);

        public int getCount()
        {
            return 25;
        }

        public Object getItem(int arg0)
        {
            return arg0;
        }

        public long getItemId(int arg0)
        {
            return arg0;
        }

        public View getView(int arg0, View arg1, ViewGroup arg2)
        {
            TextView tv =
                    (TextView) (arg1 == null
                    ? new TextView(Main.this) : arg1);
            tv.setLayoutParams(lp);
            tv.setText(arg0 + "");
            tv.setTextColor(Color.rgb(0, 0, 0));
            return tv;
        }
    }
}
 
Status
Not open for further replies.