This class provides the UI for displaying the Facebook Like button and its associated components.
ขยาย: | FrameLayout |
แพ็คเกจ: | widget |
LikeView(Context)
Constructor
public LikeView(Context context)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | Context for this View |
LikeView(Context, AttributeSet)
Constructor
public LikeView(Context context, AttributeSet attrs)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | Context for this View |
attrs | AttributeSet for this View. |
handleOnActivityResult(Context, int, int, Intent)
If your app does not use UiLifeCycleHelper, then you must call this method in the calling activity's onActivityResult method, to process any pending like actions, where tapping the button had resulted in the Like dialog being shown in the Facebook application.
public static boolean handleOnActivityResult(Context context, int requestCode, int resultCode, Intent data)
พารามิเตอร์ | คำอธิบาย |
---|---|
context | Hosting context |
requestCode | From the originating call to onActivityResult |
resultCode | From the originating call to onActivityResult |
data | From the originating call to onActivityResult |
setObjectId(String)
Sets the associated object for this LikeView. Can be changed during runtime.
public void setObjectId(String objectId)
พารามิเตอร์ | คำอธิบาย |
---|---|
objectId | Object Id |
setLikeViewStyle(Style)
Sets the facebook:style for this LikeView. Can be changed during runtime.
public void setLikeViewStyle(Style likeViewStyle)
พารามิเตอร์ | คำอธิบาย |
---|---|
likeViewStyle | Should be either LikeView.STANDARD, LikeView.BUTTON or LikeView.BOX_COUNT |
setAuxiliaryViewPosition(AuxiliaryViewPosition)
Sets the facebook:auxiliary_view_position for this LikeView. Can be changed during runtime.
public void setAuxiliaryViewPosition(AuxiliaryViewPosition auxiliaryViewPosition)
พารามิเตอร์ | คำอธิบาย |
---|---|
auxiliaryViewPosition | Should be either LikeView.TOP, LikeView.INLINE or LikeView.BOTTOM |
setHorizontalAlignment(HorizontalAlignment)
Sets the facebook:horizontal_alignment for this LikeView. Can be changed during runtime.
public void setHorizontalAlignment(HorizontalAlignment horizontalAlignment)
พารามิเตอร์ | คำอธิบาย |
---|---|
horizontalAlignment | Should be either LikeView.LEFT, LikeView.CENTER or LikeView.RIGHT |
setForegroundColor(int)
Sets the facebook:foreground_color for this LikeView. Can be changed during runtime. The color is only used for the social sentence text.
public void setForegroundColor(int foregroundColor)
พารามิเตอร์ | คำอธิบาย |
---|---|
foregroundColor | And valid android.graphics.Color value. |
setOnErrorListener(OnErrorListener)
Sets an OnErrorListener for this instance of LoginButton to call into when certain exceptions occur.
public void setOnErrorListener(OnErrorListener onErrorListener)
พารามิเตอร์ | คำอธิบาย |
---|---|
onErrorListener | The listener object to set |
getOnErrorListener()
Returns the current OnErrorListener for this instance of LoginButton.
public OnErrorListener getOnErrorListener()