> Can you show me a simple ex.?

Not readily. I do not know of an example with multiple ListViews, since
that is an uncommon UI pattern.

> If this is two lists in main xml.
> <ListView
>           android:id="@android:id/list1"
>      android:layout_width="fill_parent"
>      android:layout_height="wrap_content" />
> <ListView
>           android:id="@android:id/list2"
>      android:layout_width="fill_parent"
>      android:layout_height="wrap_content" />

No.

Step #1: Switch away from ListActivity and just use Activity. ListActivity
is simply confusing you.

Step #2: Replace your android:id values in the above XML with ones that
look like

android:id="@+id/list1"
android:id="@+id/list2"

> ListView ls1=(ListView)findViewById(R.id.list1);
> ListView ls2=(ListView)findViewById(R.id.list2);

If you follow the above steps, those statements will work.

> then how to set List?
> ???
> SimpleCursorAdapter notes =
>           new SimpleCursorAdapter(this, R.layout.notes_row_weekly,
> notesCursor, from, to);
>       setListAdapter(notes); ???

ls1.setAdapter(), as documented in:

http://developer.android.com/reference/android/widget/ListView.html

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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