示例#1
0
  @Override
  public void onResume() {
    super.onResume();

    mAdapter.startLocationUpdate();
    mAdapter.notifyDataSetChanged();
  }
示例#2
0
  @Override
  public boolean onMenuItemClick(MenuItem menuItem) {
    Bookmark item = (Bookmark) mAdapter.getItem(mSelectedPosition);

    switch (menuItem.getItemId()) {
      case R.id.share_message:
        ShareOption.SMS.shareMapObject(getActivity(), item);
        break;

      case R.id.share_email:
        ShareOption.EMAIL.shareMapObject(getActivity(), item);
        break;

      case R.id.share:
        ShareOption.ANY.shareMapObject(getActivity(), item);
        break;

      case R.id.edit:
        editBookmark(mCategory.getId(), item.getBookmarkId());
        break;

      case R.id.delete:
        BookmarkManager.INSTANCE.deleteBookmark(item);
        mAdapter.notifyDataSetChanged();
        break;
    }
    return false;
  }