I have got a database of countries and international organizations. Each 
country can be a member of a number of the organizations and each 
organization has at least one member (in other words , many-to-many). I use 
the well-known 
LoaderManager<http://developer.android.com/reference/android/app/LoaderManager.html>framework
 for displaying. But after I delete an item (some items), all the 
fragments show the deleted items. I've tried to use this 
solution<http://stackoverflow.com/questions/7379165/update-data-in-listfragment-as-part-of-viewpager>from
 the `onContextItemSelected` of `MyFragment extends 
SherlockListFragment` class but nothing has happened.

    @Override
    public boolean onContextItemSelected(MenuItem item) {
        AdapterView.AdapterContextMenuInfo info = (AdapterContextMenuInfo) 
item.getMenuInfo();
        switch (item.getItemId()) {
        case R.id.countryMenu_delete:
            long id = info.id;
            // deleting
            Bundle loaderExtras = createLoaderExtras();
            getLoaderManager().restartLoader(LOADER_ID, loaderExtras, 
this); // Restarting for the current fragment
            return true;

        default:
            return super.onContextItemSelected(item);
        }
    }

**The result.**

I don't have any errors in log but sometimes the list view isn't refreshed.

The application is on GitHub <https://github.com/Red-Planet/Sandbox_Android>, 
ActionBarSherlock <https://github.com/Red-Planet/ActionBarSherlock> is used 
in it.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to