diff options
author | Camil Staps | 2015-04-15 23:04:40 +0200 |
---|---|---|
committer | Camil Staps | 2015-04-15 23:04:40 +0200 |
commit | 0c72c11b27532053ceebc8fc97f98179688c4301 (patch) | |
tree | 79a7a75b3c23d8327df0e14140ed7f24ec47e35a /app | |
parent | javadoc DisablableViewPager (diff) |
javadoc Sharable
Diffstat (limited to 'app')
-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(); } |