Hi,

I want to show many listviews in one activity. Something like

Textview
Listview
TextView
Listview
..........

Every listview has different type of adapter. For this, I made the
activity class like:-

public class ListTestActivity extends ListActivity {

public void onCreate(Bundle savedInstanceState){
                super.onCreate(savedInstanceState);
                setContentView(R.layout.screen); // screen.xml file
                setListAdapter(new CustomAdapter(this);
                ...............................
}


class CustomAdapter extends ArrayAdapter {
                Activity context;

public View getView(int position, View convertView,  ViewGroup parent)
{
...............................
}

In screen.xml file if I define Listview like:-

<ListView
        android:id="@android:id/list"

I can get one listview with the custom adapter in this kind of
arrangement.
But when I replace it by  android:id="@+id/list2" and use it as
R.id.list2, it throws nullpointer exception.

Any pointers for this problem??

Thanks,
Aayush

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

Reply via email to