public class LikeActionController
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
LikeActionController.CreationCallback
Used by the call to getControllerForObjectId()
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_LIKE_ACTION_CONTROLLER_DID_ERROR |
static java.lang.String |
ACTION_LIKE_ACTION_CONTROLLER_DID_RESET |
static java.lang.String |
ACTION_LIKE_ACTION_CONTROLLER_UPDATED |
static java.lang.String |
ACTION_OBJECT_ID_KEY |
static java.lang.String |
ERROR_INVALID_OBJECT_ID |
static java.lang.String |
ERROR_PUBLISH_ERROR |
Modifier and Type | Method and Description |
---|---|
static void |
getControllerForObjectId(java.lang.String objectId,
LikeView.ObjectType objectType,
LikeActionController.CreationCallback callback)
Called by the LikeView when an object-id is set on it.
|
java.lang.String |
getLikeCountString()
Gets the String representation of the like-count for the associated object
|
java.lang.String |
getObjectId()
Gets the the associated object id
|
java.lang.String |
getSocialSentence()
Gets the String representation of the like-count for the associated object
|
static boolean |
handleOnActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
Called from CallbackManager to process any pending likes that had resulted in the Like
dialog being displayed
|
boolean |
isObjectLiked()
Indicates whether the associated object is liked
|
boolean |
shouldEnableView()
Indicates whether the LikeView should enable itself.
|
void |
toggleLike(android.app.Activity activity,
FragmentWrapper fragment,
android.os.Bundle analyticsParameters)
Entry-point to the code that performs the like/unlike action.
|
public static final java.lang.String ACTION_LIKE_ACTION_CONTROLLER_UPDATED
public static final java.lang.String ACTION_LIKE_ACTION_CONTROLLER_DID_ERROR
public static final java.lang.String ACTION_LIKE_ACTION_CONTROLLER_DID_RESET
public static final java.lang.String ACTION_OBJECT_ID_KEY
public static final java.lang.String ERROR_INVALID_OBJECT_ID
public static final java.lang.String ERROR_PUBLISH_ERROR
public static boolean handleOnActivityResult(int requestCode, int resultCode, android.content.Intent data)
requestCode
- From the originating call to onActivityResultresultCode
- From the originating call to onActivityResultdata
- From the originating call to onActivityResultpublic static void getControllerForObjectId(java.lang.String objectId, LikeView.ObjectType objectType, LikeActionController.CreationCallback callback)
objectId
- Object Idcallback
- Callback to be invoked when the LikeActionController has been created.public java.lang.String getObjectId()
public java.lang.String getLikeCountString()
public java.lang.String getSocialSentence()
public boolean isObjectLiked()
public boolean shouldEnableView()
public void toggleLike(android.app.Activity activity, FragmentWrapper fragment, android.os.Bundle analyticsParameters)