You could solve this by sending a bundle with the id of the newly
created item to your listactivity and focus the list on this item when
it recieves the bundle from the subactivity. The delete thing could
also be solved in a similair way, but I agree that it would be better
if this worked automatically.

On Apr 7, 4:55 am, vl <[EMAIL PROTECTED]> wrote:
> > 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 android-developers@googlegroups.com
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