Android Studio Home Page Design | Cardview With Text & Image View




XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#7E7B7B"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/Section"
        >
        <RelativeLayout
            android:id="@+id/upper"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:id="@+id/HeadingText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="35dp"
                    android:gravity="center_horizontal"
                    android:text="My Tech Classes"
                    android:textColor="@color/black" />

                <RelativeLayout
                    android:id="@+id/section1"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/HeadingText"
                    android:layout_marginBottom="12dp">

                    <LinearLayout

                        android:id="@+id/section2"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="9dp"
                        android:orientation="horizontal"
                        android:weightSum="2">

                        <RelativeLayout
                            android:id="@+id/Section2A"
                            android:layout_width="200dp"
                            android:layout_height="200dp"
                            android:layout_gravity="center_horizontal">

                            <ImageView
                                android:id="@+id/Img1"
                                android:layout_width="150dp"
                                android:layout_height="150dp"
                                android:src="@drawable/Lady" />


                            <TextView
                                android:id="@+id/T1"
                                android:layout_width="wrap_content"
                                android:layout_height="28dp"
                                android:layout_below="@id/Img1"
                                android:layout_centerHorizontal="true"
                                android:text="Computer Fundamentals"
                                android:textColor="@color/black" />

                        </RelativeLayout>


                        <RelativeLayout
                            android:id="@+id/Section2B"
                            android:layout_width="200dp"
                            android:layout_height="200dp"
                            android:layout_gravity="center_horizontal">

                            <ImageView
                                android:id="@+id/Img2"
                                android:layout_width="150dp"
                                android:layout_height="150dp"
                                android:src="@drawable/Transaction" />

                            <TextView
                                android:id="@+id/T2"
                                android:layout_width="wrap_content"
                                android:layout_height="28dp"
                                android:layout_below="@id/Img2"
                                android:layout_centerHorizontal="true"
                                android:text="IT Accounting"
                                android:textColor="@color/black" />

                        </RelativeLayout>


                    </LinearLayout>

                </RelativeLayout>


            </RelativeLayout>

        </RelativeLayout>



        <RelativeLayout
            android:id="@+id/lower"
            android:layout_below="@id/upper"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <RelativeLayout
                android:id="@id/section4"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">


                <RelativeLayout
                    android:id="@+id/section4"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="12dp">

                    <LinearLayout

                        android:id="@+id/section3"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="9dp"
                        android:orientation="horizontal"
                        android:weightSum="2">

                        <RelativeLayout
                            android:id="@+id/Section3A"
                            android:layout_width="200dp"
                            android:layout_height="200dp"
                            android:layout_gravity="center_horizontal">

                            <ImageView
                                android:id="@+id/Img3"
                                android:layout_width="150dp"
                                android:layout_height="150dp"
                                android:src="@drawable/Tally" />


                            <TextView
                                android:id="@+id/T3"
                                android:layout_width="wrap_content"
                                android:layout_height="28dp"
                                android:layout_below="@id/Img3"
                                android:layout_centerHorizontal="true"
                                android:text="Tally Prime"
                                android:textColor="@color/black" />

                        </RelativeLayout>


                        <RelativeLayout
                            android:id="@+id/Section3B"
                            android:layout_width="200dp"
                            android:layout_height="200dp"
                            android:layout_gravity="center_horizontal">

                            <ImageView
                                android:id="@+id/Img4"
                                android:layout_width="150dp"
                                android:layout_height="150dp"
                                android:src="@drawable/Programming" />

                            <TextView
                                android:id="@+id/T4"
                                android:layout_width="wrap_content"
                                android:layout_height="28dp"
                                android:layout_below="@id/Img4"
                                android:layout_centerHorizontal="true"
                                android:text="Programming"
                                android:textColor="@color/black" />


                        </RelativeLayout>


                    </LinearLayout>

                </RelativeLayout>


            </RelativeLayout>

        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/bottom"
            android:layout_below="@id/lower"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

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


                <RelativeLayout
                    android:id="@+id/section5"
                    android:layout_width="200dp"
                    android:layout_height="100dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginBottom="12dp">

                    <RelativeLayout
                        android:id="@+id/Section6A"
                        android:layout_width="200dp"
                        android:layout_height="200dp"
                        android:layout_gravity="center_horizontal">

                        <ImageView
                            android:id="@+id/Img5"
                            android:layout_width="200dp"
                            android:layout_height="80dp"
                            android:src="@drawable/feedback" />


                        <TextView
                            android:id="@+id/T5"
                            android:layout_width="wrap_content"
                            android:layout_height="28dp"
                            android:layout_below="@id/Img5"
                            android:layout_centerHorizontal="true"
                            android:text="Feedback"
                            android:textColor="@color/black" />

                    </RelativeLayout>


                </RelativeLayout>



        </RelativeLayout>


            </RelativeLayout>

        </RelativeLayout>
    
</RelativeLayout>