diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/camilstaps/common/Sharable.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/src/main/java/com/camilstaps/common/Sharable.java b/app/src/main/java/com/camilstaps/common/Sharable.java index d0f8c1d..6e9fc56 100644 --- a/app/src/main/java/com/camilstaps/common/Sharable.java +++ b/app/src/main/java/com/camilstaps/common/Sharable.java @@ -1,11 +1,21 @@ package com.camilstaps.common; /** - * Created by camilstaps on 15-4-15. + * An item that can be shared (typically a fragment) */ public interface Sharable<T> { + /** + * Get the item that should be shared when the user clicks on element R.id.<id> + * @param id the XML id the resource is linked to + * @return the item to share + */ public abstract T getItem(int id); + + /** + * Get the XML id of the menu to inflate to give the user different sharing options + * @return -1 if there are no options, an XML id if there are + */ public abstract int getMenuId(); } |