<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView android:layout_width="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:cardUseCompatPadding="true"
    android:layout_height="wrap_content">

  <com.google.android.gms.ads.formats.UnifiedNativeAdView
      android:layout_height="350dp"
      android:layout_width="match_parent"
      android:id="@+id/native_ad_view"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:android="http://schemas.android.com/apk/res/android">
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_centerInParent="true"
        android:padding="5dp"
        android:id="@+id/background"
        >

      <com.google.android.gms.ads.formats.MediaView
          android:id="@+id/media_view"
          android:layout_margin="@dimen/gnt_no_size"
          android:layout_width="match_parent"
          android:layout_height="200dp"
          android:layout_marginTop="@dimen/gnt_no_margin"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:layout_constraintBottom_toTopOf="@id/middle"
          />

      <androidx.constraintlayout.widget.ConstraintLayout
          android:layout_height="60dp"
          android:layout_marginTop="@dimen/gnt_default_margin"
          android:layout_width="match_parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@id/media_view"
          app:layout_constraintBottom_toTopOf="@+id/body"
          android:id="@+id/middle"
          >
        <androidx.constraintlayout.widget.ConstraintLayout

            android:layout_width="@dimen/gnt_no_size"
            android:layout_height="@dimen/gnt_no_size"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            android:orientation="horizontal"
            >
          <ImageView
              android:id="@+id/icon"
              android:layout_width="0dp"
              android:layout_weight="0"
              android:layout_height="match_parent"
              android:layout_marginTop="@dimen/gnt_no_margin"
              android:layout_marginStart="@dimen/gnt_default_margin"
              android:layout_marginBottom="@dimen/gnt_no_margin"
              android:layout_marginEnd="@dimen/gnt_no_margin"
              app:layout_constraintDimensionRatio="H,1:1"
              android:scaleType="fitCenter"
              app:layout_constraintStart_toStartOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toStartOf="@id/content"
              android:layout_marginLeft="@dimen/gnt_default_margin"
              android:layout_marginRight="@dimen/gnt_no_margin" />
          <androidx.constraintlayout.widget.ConstraintLayout
              android:layout_width="@dimen/gnt_no_size"
              android:layout_height="@dimen/gnt_no_size"
              android:orientation="vertical"
              android:id="@+id/content"
              android:layout_marginLeft="@dimen/gnt_default_margin"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintStart_toEndOf="@id/icon"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintTop_toTopOf="parent"
              >
            <LinearLayout
                android:id="@+id/headline"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="@dimen/gnt_no_size"
                android:layout_weight="0.5"
                app:layout_constraintBottom_toTopOf="@+id/row_two"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                >

              <TextView
                  android:id="@+id/primary"
                  android:background="@color/gnt_white"
                  android:textStyle="bold"
                  android:textSize="@dimen/gnt_text_size_large"
                  android:textColor="@color/gnt_gray"
                  android:lines="1"
                  android:layout_height="match_parent"
                  android:layout_width="match_parent"
                  android:layout_marginTop="@dimen/gnt_no_margin"
                  android:layout_marginBottom="@dimen/gnt_no_margin"
                  android:layout_marginStart="@dimen/gnt_no_margin"
                  android:layout_marginEnd="@dimen/gnt_no_margin"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toEndOf="parent"
                  app:layout_constraintTop_toTopOf="parent"
                  ></TextView>
            </LinearLayout>
            <LinearLayout
                android:id="@+id/row_two"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="@dimen/gnt_no_size"
                android:layout_weight="0.5"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/headline"
                >
              <TextView
                  android:background="@drawable/gnt_rounded_corners_shape"
                  android:layout_width="@dimen/gnt_ad_indicator_width"
                  android:gravity="center"
                  android:id="@+id/ad_notification_view"
                  android:layout_height="@dimen/gnt_ad_indicator_height"
                  android:layout_marginTop="@dimen/gnt_ad_indicator_top_margin"
                  android:layout_marginStart="@dimen/gnt_no_margin"
                  android:layout_marginEnd="@dimen/gnt_default_margin"
                  android:text="Ad"
                  android:textColor="@color/gnt_ad_green"
                  android:textStyle="bold"
                  android:textSize="@dimen/gnt_ad_indicator_text_size"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="parent"
                  android:layout_marginLeft="@dimen/gnt_no_margin"
                  android:layout_marginRight="@dimen/gnt_default_margin">
              </TextView>
              <RatingBar
                  android:id="@+id/rating_bar"
                  android:background="@color/gnt_white"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:textSize="@dimen/gnt_text_size_small"
                  android:textColor="@color/gnt_gray"
                  android:numStars="0"
                  android:lines="1"
                  android:layout_marginTop="@dimen/gnt_no_margin"
                  android:layout_marginBottom="@dimen/gnt_no_margin"
                  android:layout_marginStart="@dimen/gnt_no_margin"
                  android:layout_marginEnd="@dimen/gnt_no_margin"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toEndOf="@id/ad_notification_view"
                  app:layout_constraintTop_toTopOf="parent">

              </RatingBar>
              <TextView
                  android:id="@+id/secondary"
                  android:background="@color/gnt_white"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:gravity="top"
                  android:textSize="@dimen/gnt_text_size_small"
                  android:textColor="@color/gnt_gray"
                  android:lines="1"
                  android:layout_marginTop="@dimen/gnt_no_margin"
                  android:layout_marginBottom="@dimen/gnt_no_margin"
                  android:layout_marginStart="@dimen/gnt_no_margin"
                  android:layout_marginEnd="@dimen/gnt_no_margin"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintEnd_toEndOf="parent"
                  app:layout_constraintStart_toEndOf="@id/ad_notification_view"
                  app:layout_constraintTop_toTopOf="parent"
                  ></TextView>

            </LinearLayout>


          </androidx.constraintlayout.widget.ConstraintLayout>


        </androidx.constraintlayout.widget.ConstraintLayout>
      </androidx.constraintlayout.widget.ConstraintLayout>
      <TextView
          android:layout_width="match_parent"
          android:layout_margin="@dimen/gnt_no_size"
          android:layout_height="wrap_content"
          android:paddingBottom="@dimen/gnt_default_margin"
          android:paddingLeft="@dimen/gnt_default_margin"
          android:id="@+id/body"
          app:layout_constraintBottom_toTopOf="@+id/cta"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@id/middle"
          android:layout_marginBottom="@dimen/gnt_default_margin"
          />
      <Button
          android:id="@+id/cta"
          android:layout_width="match_parent"
          android:layout_height="0dp"
          android:background="@color/gnt_blue"
          android:textColor="@color/gnt_white"
          android:layout_marginLeft="5dp"
          android:layout_marginRight="5dp"
          android:lines="1"
          android:gravity="center"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toBottomOf="@id/body"
          />

    </androidx.constraintlayout.widget.ConstraintLayout>
  </com.google.android.gms.ads.formats.UnifiedNativeAdView>

</androidx.cardview.widget.CardView>
