If you are not read yet the part-03 blog then first of all you read and implement part-01 visit CLICK HERE. Because this blog linked with part-03

In this blog, we can learn and create Facebook, Google, and Phone Authentication icons which is help to sign in with third-party applications.

First, we can go back to the activity_main.xml layout and start coding for Facebook, Google, and Phone Authentication system like Fab Icons. So under constraint layout, we can place below ViewPager Layout code directly in your project.

Below code related to Facebook Icon.

<androidx.cardview.widget.CardView
    android:id="@+id/facebookLogin"
    android:layout_width="50dp"
    android:layout_height="50dp"
    android:clickable="true"
    android:focusable="true"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardCornerRadius="100dp"
    app:cardElevation="3dp"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toStartOf="@+id/googleLogin"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/viewPager">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center">

        <ImageView
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:contentDescription="@string/app_name"
            android:src="@drawable/facebook_icon" />

    </RelativeLayout>


</androidx.cardview.widget.CardView>

Now, we can create a google icon under card view.

If you can not understand then watch our YouTube videos CLICK HERE

<androidx.cardview.widget.CardView
android:id="@+id/googleLogin"
android:layout_width="50dp"
android:layout_height="50dp"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="100dp"
app:cardElevation="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/viewPager">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@string/app_name"
android:src="@drawable/google_icon" />

</RelativeLayout>
</androidx.cardview.widget.CardView>

And last one, we will implement Phone Authentication icon.

<androidx.cardview.widget.CardView
android:id="@+id/phoneLogin"
android:layout_width="50dp"
android:layout_height="50dp"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:cardCornerRadius="100dp"
app:cardElevation="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/googleLogin"
app:layout_constraintTop_toBottomOf="@+id/viewPager">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">

<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:contentDescription="@string/app_name"
android:src="@drawable/phone_icon" />

</RelativeLayout>


</androidx.cardview.widget.CardView>

All code is pasted in your project next code will be available in NEXT part-05 CLICK HERE.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *