Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Request For Profile Page #67

Open
wants to merge 12 commits into
base: profile-page
Choose a base branch
from
Prev Previous commit
Next Next commit
Add Cardview to sign in button
* Use google sans font for Welcome message
mohancm committed May 6, 2018
commit 695e896ba91529b5b54ca31be2c0bc09429d2729
11 changes: 11 additions & 0 deletions app/src/main/res/drawable/round_google.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#DEB887"/>
<stroke android:color="#8A2BE2" android:width="2dp" />
<!--corners allow us to make the rounded corners button-->
<corners android:radius="15dp" />
</shape>
</item>
</selector>
29 changes: 25 additions & 4 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="136dp"
android:fontFamily="@font/google_sans_bold"
android:text="@string/login_welcome_title"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@android:color/white"
@@ -22,17 +23,37 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.gms.common.SignInButton
android:id="@+id/google_sign_in_button"
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:cardCornerRadius="4dp"
app:cardElevation="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.29000002" />
app:layout_constraintTop_toTopOf="parent">

<com.google.android.gms.common.SignInButton
android:id="@+id/google_sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:elevation="1dp"
android:layout_margin="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.29000002" />

</android.support.v7.widget.CardView>
</android.support.constraint.ConstraintLayout>