From 0c72c11b27532053ceebc8fc97f98179688c4301 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 15 Apr 2015 23:04:40 +0200 Subject: javadoc Sharable --- app/src/main/java/com/camilstaps/common/Sharable.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'app/src') 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 { + /** + * Get the item that should be shared when the user clicks on element R.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(); } -- cgit v1.2.3