<?xml version="1.0" encoding="utf-8"?>
<com.google.android.gms.ads.nativead.NativeAdView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/ad_layout"
    android:layout_width="match_parent"
    android:layout_height="70dp"
    android:background="@color/background_secondary">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:orientation="horizontal">

        <androidx.cardview.widget.CardView
            android:id="@+id/ad_icon_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="5dp"
            app:cardCornerRadius="6dp"
            app:cardElevation="-1dp">

            <ImageView
                android:id="@+id/ad_app_icon"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:scaleType="fitCenter" />
        </androidx.cardview.widget.CardView>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:id="@+id/tvContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="10dp"
                android:layout_marginTop="10dp"
                android:layout_marginEnd="10dp"
                android:layout_toStartOf="@id/ad_call_to_action"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <TextView
                        android:id="@+id/tv_ad_tag"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="@drawable/ad_tag_bg"
                        android:paddingStart="2dp"
                        android:paddingEnd="2dp"
                        android:text="AD"
                        android:textColor="@color/white"
                        android:textSize="9sp" />
                    <TextView
                        android:id="@+id/ad_headline"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="5dp"
                        android:layout_marginEnd="5dp"
                        android:ellipsize="end"
                        android:singleLine="true"
                        android:textColor="@color/text_color_main"
                        android:textSize="13sp"
                        android:textStyle="bold" />
                </LinearLayout>

                <TextView
                    android:id="@+id/ad_body"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="3dp"
                    android:layout_marginEnd="5dp"
                    android:layout_marginBottom="5dp"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:textColor="@color/text_color_second"
                    android:textSize="12sp"
                    android:textStyle="normal" />

            </LinearLayout>

            <com.example.tiksave.views.flashbutton.AdsFlashButton
                android:id="@+id/ad_call_to_action"
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_alignParentEnd="true"
                android:layout_centerVertical="true"
                android:layout_marginTop="6dp"
                android:layout_marginEnd="10dp"
                android:background="@drawable/bg_round_view_yellow"
                android:gravity="center"
                android:textAlignment="center"
                android:textAllCaps="false"
                android:textColor="@color/white"
                android:textSize="12sp"
                android:visibility="visible" />
        </RelativeLayout>
    </LinearLayout>

</com.google.android.gms.ads.nativead.NativeAdView>
