Android SDK Version
  • java.lang.Object
    • Button
      • com.facebook.FacebookButtonBase

public abstract class FacebookButtonBase
extends Button
A base class for a facebook button.
Constructor Summary
ModifierConstructor and Description
protected FacebookButtonBase(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes, java.lang.String analyticsButtonCreatedEventName, java.lang.String analyticsButtonTappedEventName) 
Method Summary
Modifier and TypeMethod and Description
protected voidcallExternalOnClickListener(View v) 
protected voidconfigureButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) 
protected ActivitygetActivity() 
intgetCompoundPaddingLeft() 
intgetCompoundPaddingRight() 
protected abstract intgetDefaultRequestCode() 
protected intgetDefaultStyleResource() 
FragmentgetFragment()
Gets the fragment that contains this control.
android.app.FragmentgetNativeFragment()
Gets the fragment that contains this control.
intgetRequestCode()
Returns the request code used for this Button.
protected intmeasureTextWidth(java.lang.String text) 
protected voidonAttachedToWindow() 
protected voidonDraw(Canvas canvas) 
voidsetFragment(android.app.Fragment fragment)
Sets the fragment that contains this control.
voidsetFragment(Fragment fragment)
Sets the fragment that contains this control.
protected voidsetInternalOnClickListener(OnClickListener l) 
voidsetOnClickListener(OnClickListener l) 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

FacebookButtonBase

protected FacebookButtonBase(Context context,
                             AttributeSet attrs,
                             int defStyleAttr,
                             int defStyleRes,
                             java.lang.String analyticsButtonCreatedEventName,
                             java.lang.String analyticsButtonTappedEventName)
Method Detail

getDefaultRequestCode

protected abstract int getDefaultRequestCode()

setFragment

public void setFragment(Fragment fragment)
Sets the fragment that contains this control. This allows the button to be embedded inside a Fragment, and will allow the fragment to receive the onActivityResult call rather than the Activity.
Parameters:
fragment - the android.support.v4.app.Fragment that contains this control

setFragment

public void setFragment(android.app.Fragment fragment)
Sets the fragment that contains this control. This allows the button to be embedded inside a Fragment, and will allow the fragment to receive the onActivityResult call rather than the Activity.
Parameters:
fragment - the android.app.Fragment that contains this control

getFragment

public Fragment getFragment()
Gets the fragment that contains this control.
Returns:
The android.support.v4.app.Fragment that contains this control.

getNativeFragment

public android.app.Fragment getNativeFragment()
Gets the fragment that contains this control.
Returns:
The android.app.Fragment that contains this control.

setOnClickListener

public void setOnClickListener(OnClickListener l)

getRequestCode

public int getRequestCode()
Returns the request code used for this Button.
Returns:
the request code.

onAttachedToWindow

protected void onAttachedToWindow()

onDraw

protected void onDraw(Canvas canvas)

getCompoundPaddingLeft

public int getCompoundPaddingLeft()

getCompoundPaddingRight

public int getCompoundPaddingRight()

getActivity

protected Activity getActivity()

getDefaultStyleResource

protected int getDefaultStyleResource()

measureTextWidth

protected int measureTextWidth(java.lang.String text)

configureButton

protected void configureButton(Context context,
                               AttributeSet attrs,
                               int defStyleAttr,
                               int defStyleRes)

callExternalOnClickListener

protected void callExternalOnClickListener(View v)

setInternalOnClickListener

protected void setInternalOnClickListener(OnClickListener l)