Skip to content

Instantly share code, notes, and snippets.

@jamesmontemagno
Created November 15, 2013 17:46
Show Gist options
  • Save jamesmontemagno/7488535 to your computer and use it in GitHub Desktop.
Save jamesmontemagno/7488535 to your computer and use it in GitHub Desktop.
Google Plust Login and +1 button Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="12dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center">
<com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<Button
android:id="@+id/logout_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Logout"/>
</LinearLayout>
<com.google.android.gms.plus.PlusOneButton
android:id="@+id/plus_one_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
plus:size="standard"
plus:annotation="inline"
android:layout_marginTop="12dp" />
<ImageView
android:src="@android:drawable/ic_menu_gallery"
android:layout_width="100dp"
android:layout_height="100dp"
android:id="@+id/profile_image"
android:layout_marginTop="12dp" />
<TextView
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/profile_name"
android:singleLine="true" />
<TextView
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/profile_nickname"
android:singleLine="true" />
<TextView
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/profile_about"
android:maxLines="3" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment