Update the contextual action menu to not show edit option

for "Shared with me" tracks and markers.
Also not show the delete option for markers from
"Shared with me" tracks.
This commit is contained in:
Jimmy Shih
2013-02-02 13:54:24 -08:00
parent f26a8799fa
commit e53df3cff1
5 changed files with 76 additions and 7 deletions
@@ -22,7 +22,7 @@ package com.google.android.apps.mytracks;
* @author Jimmy Shih
*/
public interface ContextualActionModeCallback {
/**
* Invoked when an item is selected.
*
@@ -31,4 +31,20 @@ public interface ContextualActionModeCallback {
* @param id the id of the selected row, if available
*/
public boolean onClick(int itemId, int position, long id);
/**
* True if the item in the selected row can be edited.
*
* @param position the position of the selected row
* @param id the id of the selected row
*/
public boolean canEdit(int position, long id);
/**
* True if the item in the selected row can be deleted.
*
* @param position the position of the selected row
* @param id the id of the selected row
*/
public boolean canDelete(int position, long id);
}