<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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_marginBottom="75dp"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white">

<!--    margin Bottom of 75dp above is important for the home appearance-->

    <RelativeLayout
        android:id="@+id/relativeLayout3"
        android:layout_width="0dp"

        android:layout_height="0dp"

        android:background="@color/color_primary_dark"
        app:layout_constraintBottom_toTopOf="@+id/guideline"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="15dp"
            android:layout_marginTop="?android:attr/actionBarSize"
            android:fontFamily="@font/nunito_medium"
            android:text="@string/patient_profile"

            android:textColor="@color/white"
            android:textSize="@dimen/_18ssp"

            />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/title"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="@dimen/_15sdp"
            android:gravity="center_horizontal"
            android:orientation="vertical">

            <de.hdodenhof.circleimageview.CircleImageView
                android:id="@+id/profile_img"
                android:layout_width="@dimen/_80sdp"
                android:layout_height="@dimen/_80sdp"

                android:layout_marginTop="15dp"
                android:contentDescription="@string/patient_profile"

                android:elevation="15dp"
                app:civ_circle_background_color="@color/white"

                android:src="@drawable/senior_img" />

            <TextView
                android:id="@+id/name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"

                android:layout_marginTop="5dp"
                android:ellipsize="end"
                android:fontFamily="@font/nunito_semibold"
                android:maxEms="10"
                android:maxLines="1"

                tools:text="@string/aditya_gaikwad"
                android:textAlignment="center"
                android:textColor="@color/white"

                android:textSize="@dimen/_16ssp" />

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:baselineAligned="true"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/icon"
                    android:layout_width="@dimen/_35sdp"
                    android:layout_height="@dimen/_35sdp"

                    android:paddingStart="0dp"

                    android:paddingTop="5dp"

                    android:paddingEnd="-5dp"
                    android:scaleType="fitXY"
                    android:src="@drawable/ic_phone_img"

                    />

                <TextView
                    android:id="@+id/phone_number"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:layout_marginTop="1dp"
                    android:ellipsize="end"
                    android:fontFamily="@font/nunito_semibold"

                    android:gravity="center"

                    android:maxLines="1"

                    android:text="@string/_918208401763"
                    android:textColor="@color/white"
                    android:textSize="@dimen/_14ssp" />

            </LinearLayout>

        </LinearLayout>

    </RelativeLayout>

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.45" />

    <RelativeLayout
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:orientation="vertical"
        android:background="@color/color_primary_dark"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/relativeLayout3">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/top_round_corner_25dp"
            >

            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:overScrollMode="never"
                android:scrollbars="none"
                >

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="15dp"
                    android:orientation="vertical"
                    >

                    <LinearLayout
                        android:id="@+id/peronal_info"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:gravity="center_vertical"
                        android:layout_marginTop="25dp"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_user_outline"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/personal_information"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_1"

                                />

                            <ImageView
                                android:id="@+id/btn_1"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/contacts"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="15dp"
                        android:gravity="center_vertical"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_contacts_2"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/contacts"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_2"

                                />

                            <ImageView
                                android:id="@+id/btn_2"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/medication"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="15dp"
                        android:gravity="center_vertical"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_medication"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/medication"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_3"

                                />

                            <ImageView
                                android:id="@+id/btn_3"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/med_records"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="15dp"
                        android:gravity="center_vertical"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_med_records"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/medical_records"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_4"

                                />

                            <ImageView
                                android:id="@+id/btn_4"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/pat_activities"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="15dp"
                        android:gravity="center_vertical"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_pat_activites"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/patient_activities"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_5"

                                />

                            <ImageView
                                android:id="@+id/btn_5"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/freq_used_apps"
                        android:visibility="gone"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="15dp"
                        android:gravity="center_vertical"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_freq_app_2"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/frequently_used_apps"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_6"

                                />

                            <ImageView
                                android:id="@+id/btn_6"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/sub_plans"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="15dp"
                        android:gravity="center_vertical"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_subs_plan"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/subscription_plan"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_7"

                                />

                            <ImageView
                                android:id="@+id/btn_7"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/geofence"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:layout_marginTop="15dp"
                        android:layout_marginBottom="30dp"
                        android:gravity="center_vertical"
                        >

                        <androidx.cardview.widget.CardView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"

                            app:cardCornerRadius="8dp"

                            app:cardElevation="0dp"

                            >

                            <ImageView
                                android:layout_width="@dimen/_40sdp"
                                android:layout_height="@dimen/_40sdp"

                                android:padding="10dp"

                                android:src="@drawable/ic_location"
                                android:background="#e2f4ff"
                                app:tint="@color/color_primary_dark" />

                        </androidx.cardview.widget.CardView>

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

                            <TextView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"

                                android:text="@string/geofence"
                                android:fontFamily="@font/nunito_semibold"
                                android:textColor="@color/black"
                                android:textSize="@dimen/_16ssp"

                                android:layout_marginStart="15dp"
                                android:layout_toStartOf="@id/btn_8"

                                />

                            <ImageView
                                android:id="@+id/btn_8"
                                android:layout_width="@dimen/_25sdp"
                                android:layout_height="@dimen/_25sdp"

                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"

                                android:src="@drawable/ic_next"
                                app:tint="#043E61" />

                        </RelativeLayout>

                    </LinearLayout>

                </LinearLayout>

            </ScrollView>

        </RelativeLayout>

    </RelativeLayout>


</androidx.constraintlayout.widget.ConstraintLayout>