I'm making my screen up programmatically:

                LinearLayout l = new LinearLayout(this);
                l.setOrientation(LinearLayout.VERTICAL);

                l.addView(getBarcodeButton());

                result = new TextView(this);
                result.setText(borg.phone_number);
                l.addView(result);

                ListView lv = new ListView(this);
                String[] a = {"cat", "dog", "foo", "bar", "cat", "dog", "foo", "bar", "cat", "dog", 
"foo", "bar"};
                lv.setAdapter(new ArrayAdapter(this, 
android.R.layout.simple_list_item_1, a));
                l.addView(lv);

                setContentView(l);


This works fine so long as the ListView is the last item in the LinearLayout.
If I move the button or the text below the ListView, the become invisible; the
ListView always extends to the bottom of the screen.

Am I doing something wrong?

Thanks,

Tobiah

--
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