public final class

PlusOneButtonWithPopup

extends ViewGroup
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ com.google.android.gms.plus.PlusOneButtonWithPopup

Class Overview

+1 button which shows confirmation messages in a PopupWindow.

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
PlusOneButtonWithPopup(Context context)
Constructor to create from code.
PlusOneButtonWithPopup(Context context, AttributeSet attrs)
Constructor called when inflating from XML.
Public Methods
void cancelClick()
Restore the original +1 button state.
PendingIntent getResolution()
Returns a pending intent to resolve the connection failure or null if there was none.
void initialize(String url, String accountName)
Updates the +1 button for the argument URL and account.
void reinitialize()
Reload the +1 button state.
void setAnnotation(int annotation)
Sets the annotation to display next to the button.
void setOnClickListener(View.OnClickListener onClickListener)
Sets the View.OnClickListener to handle clicks.
void setSize(int size)
Sets the size of the +1 button image.
Protected Methods
void onLayout(boolean changed, int left, int top, int right, int bottom)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public PlusOneButtonWithPopup (Context context)

Constructor to create from code.

public PlusOneButtonWithPopup (Context context, AttributeSet attrs)

Constructor called when inflating from XML.

Public Methods

public void cancelClick ()

Restore the original +1 button state.

public PendingIntent getResolution ()

Returns a pending intent to resolve the connection failure or null if there was none.

public void initialize (String url, String accountName)

Updates the +1 button for the argument URL and account.

Parameters
url The URL to be +1'd.
accountName The the name of the account tied to this +1 button (may be null).

public void reinitialize ()

Reload the +1 button state.

public void setAnnotation (int annotation)

Sets the annotation to display next to the button.

Parameters
annotation The annotation. See ANNOTATION_NONE, ANNOTATION_INLINE, and ANNOTATION_BUBBLE.

public void setOnClickListener (View.OnClickListener onClickListener)

Sets the View.OnClickListener to handle clicks.

Parameters
onClickListener The listener, or null for default behavior.

public void setSize (int size)

Sets the size of the +1 button image.

Parameters
size The size. See SIZE_STANDARD, SIZE_TALL, SIZE_MEDIUM, and SIZE_SMALL.

Protected Methods

protected void onLayout (boolean changed, int left, int top, int right, int bottom)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)