This class provides the UI for displaying the Facebook Like button and its associated components.
Estende: | FrameLayout |
Pacote: | widget |
LikeView(Context)
Constructor
public LikeView(Context context)
Parâmetro | Descrição |
---|---|
context | Context for this View |
LikeView(Context, AttributeSet)
Constructor
public LikeView(Context context, AttributeSet attrs)
Parâmetro | Descrição |
---|---|
context | Context for this View |
attrs | AttributeSet for this View. |
setObjectIdAndType(String, ObjectType)
Sets the associated object ID for this LikeView. Can be changed during runtime.
public void setObjectIdAndType(String objectId, ObjectType objectType)
Parâmetro | Descrição |
---|---|
objectId | The object ID, this can be a URL or a Facebook ID. |
objectType |
setLikeViewStyle(Style)
Sets the facebook:style for this LikeView. Can be changed during runtime.
public void setLikeViewStyle(Style likeViewStyle)
Parâmetro | Descrição |
---|---|
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)
Parâmetro | Descrição |
---|---|
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)
Parâmetro | Descrição |
---|---|
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)
Parâmetro | Descrição |
---|---|
foregroundColor | And valid android.graphics.Color value. |
setOnErrorListener(OnErrorListener)
Sets an OnErrorListener for this instance of LikeView to call into when certain exceptions occur.
public void setOnErrorListener(OnErrorListener onErrorListener)
Parâmetro | Descrição |
---|---|
onErrorListener | The listener object to set |
getOnErrorListener()
Returns the current OnErrorListener for this instance of LikeView.
public OnErrorListener getOnErrorListener()
setFragment(Fragment)
Sets the parent Fragment which is hosting this LikeView. This allows the LikeView to be embedded inside a Fragment, and will allow the fragment to receive the onActivityResult.onActivityResult(int, int, android.content.Intent) call rather than the Activity, upon completion of Likes from this view.
public void setFragment(Fragment fragment)
Parâmetro | Descrição |
---|---|
fragment | Android.support.v4.app.Fragment that is hosting the LikeView. |
setFragment(Fragment)
Sets the parent Fragment which is hosting this LikeView. This allows the LikeView to be embedded inside a Fragment, and will allow the fragment to receive the onActivityResult.onActivityResult(int, int, android.content.Intent) call rather than the Activity, upon completion of Likes from this view.
public void setFragment(Fragment fragment)
Parâmetro | Descrição |
---|---|
fragment | Android.app.Fragment that is hosting the LikeView. |