Google is committed to advancing racial equity for Black communities. See how.


public final class PlusOneButton extends FrameLayout

This class was deprecated.
This API has been deprecated. Please refer to Deprecation Notes for details.

The +1 button to recommend a URL on Google+. The button fetches +1 data from Google Play services. The +1 attributes can be set via XML, provided the PlusOneButton element has xmlns:plus="//" set.

Nested Class Summary

class PlusOneButton.DefaultOnPlusOneClickListener This is an View.OnClickListener that will proxy clicks to an attached PlusOneButton.OnPlusOneClickListener, or default to attempt to start the intent using an Activity context. 
interface PlusOneButton.OnPlusOneClickListener A listener for +1 button clicks. 

Constant Summary

int ANNOTATION_BUBBLE Display the number of users who have +1'd the URL in a graphic next to the button (default).
int ANNOTATION_INLINE Display profile pictures of connected users who have +1'd the URL and a count of users who have +1'd the URL.
int ANNOTATION_NONE Do not render any additional annotations.
int DEFAULT_ACTIVITY_REQUEST_CODE An empty ActivityRequestCode to serve as the default before the code has been assigned.
int SIZE_MEDIUM The medium button size.
int SIZE_SMALL The small button size.
int SIZE_STANDARD The standard button size.
int SIZE_TALL The tall button size.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

PlusOneButton(Context context)
Creates a +1 button of SIZE_STANDARD size with an ANNOTATION_BUBBLE annotation.
PlusOneButton(Context context, AttributeSet attrs)
Creates a +1 button of SIZE_STANDARD size with an ANNOTATION_BUBBLE annotation.

Public Method Summary

initialize(String url, int activityRequestCode)
Updates the +1 button with a URL.
initialize(String url, PlusOneButton.OnPlusOneClickListener plusOneClickListener)
Updates the +1 button with a client and URL.
setAnnotation(int annotation)
Sets the annotation to display next to the +1 button.
setSize(int size)
Sets the size of the +1 button.

Protected Method Summary

static int
static int
getSize(Context context, AttributeSet attrs)

Inherited Method Summary