<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/seekbarsize_small"
        android:layout_marginRight="@dimen/seekbarsize_small"
        app:cardBackgroundColor="#ffffff"
        app:cardElevation="2dp"
        app:cardMaxElevation="2dp"
        app:cardUseCompatPadding="true">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:minHeight="120dp"
            android:orientation="horizontal">

            <LinearLayout
                android:layout_width="70dp"
                android:layout_height="match_parent"
                android:gravity="center"
                android:orientation="vertical">

                <FrameLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">

                    <ImageView
                        android:id="@+id/cup"
                        android:layout_width="@dimen/buttonHeight"
                        android:layout_height="@dimen/buttonHeight"
                        android:layout_gravity="center"
                        android:background="@android:color/transparent"
                        android:contentDescription="@string/app_name"
                        android:scaleType="fitCenter"
                        android:src="@mipmap/leader_icon" />

                    <TextView
                        android:id="@+id/position"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:layout_marginBottom="@dimen/seekbarsize"
                        android:gravity="center"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:textColor="@color/material_black"
                        android:textSize="@dimen/textSizeToSmall"
                        android:textStyle="bold" />
                </FrameLayout>

                <TextView
                    android:id="@+id/score"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:maxLines="1"
                    android:singleLine="true"
                    android:textColor="@color/material_black"
                    android:textSize="@dimen/textSizeAverage"
                    android:textStyle="bold" />
            </LinearLayout>

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:baselineAligned="false"
                android:orientation="horizontal">

                <FrameLayout
                    android:id="@+id/endLayout"
                    android:layout_width="@dimen/buttonHeightLarge"
                    android:layout_height="@dimen/buttonHeightLarge"
                    android:layout_alignParentEnd="true"
                    android:layout_centerInParent="true"
                    android:layout_gravity="center"
                    android:layout_margin="@dimen/seekbarsize_small">

                    <ImageView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:contentDescription="@string/app_name"
                        android:scaleType="fitCenter"
                        android:src="@drawable/ellipse" />

                    <com.github.siyamed.shapeimageview.CircularImageView
                        android:id="@+id/userImage"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_margin="2dp"
                        android:background="@drawable/custom_circle_blue"
                        app:siBorderColor="@android:color/white"
                        app:siBorderWidth="0dp" />
                </FrameLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentStart="true"
                    android:layout_centerInParent="true"
                    android:layout_toLeftOf="@id/endLayout"
                    android:gravity="center"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/name"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center|left"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:textColor="@color/material_black"
                        android:textSize="@dimen/textSizeSmall"
                        android:textStyle="bold" />

                    <TextView
                        android:id="@+id/location"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center|left"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:textColor="@color/material_black"
                        android:textSize="@dimen/textSizeSmall"
                        android:visibility="gone" />

                    <TextView
                        android:id="@+id/dealer_name"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center|left"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:textColor="@color/material_black"
                        android:textSize="@dimen/textSizeSmall"
                        android:visibility="gone" />

                </LinearLayout>


            </RelativeLayout>

        </LinearLayout>

    </androidx.cardview.widget.CardView>

</LinearLayout>
