> I don't know what error you are talking about. If you create a
> listactivity and use a correctly implemented contentprovider (for
> example the Contacts content provider) the data in the list will
> updated automatically when records are added, deleted or changed.

The error is related to notion of a selected item. Take NotesList demo
application ("Note pad") as an example.

1) Create few notes.
2) Navigate through the list using up/down keys. You can see that
selected item is highlighted.
3) Click Enter. You'll see edit view. Do editing and exit it. The item
you just worked with is still highlighted (but may be in a different
position in the list).
4) Now execute delete operation.
ERROR: There is no highlighted item, but if you press Enter - one of
the items will be selected, so according to Android there is a
selection.
5) Add a new item.
ERROR: When control is returned from the editor, new item is not shown
as highlighted. For applications with small number of items in a list
it would not be a big problem, but for cases with big lists (someone
on this site mentioned that list activities were designed for tens of
thousands of items) it could be a very serious issue.

List views are refreshed in my application too and I am not using
content provider. Originally I thought that absence of content
provider was the reason for incorrect behavior in respect to
highlighted list items, but this is not the case. I still do not know
how this problem could be resolved. I cannot find in Android
appropriate notification mechanism between activities to support what
I see as the important requirement.

So from this point I have not found any advantage of using
ContentProvider for my application. And support of joins in content
providers is still a mystery for me (see one of the previous notes in
this thread).
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to