<?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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content_container"
        android:layout_width="match_parent"
        android:layout_height="72dp"
        android:background="@drawable/bg_native_ad_card"
        android:paddingHorizontal="12dp"
        android:paddingVertical="10dp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <!-- 应用图标 -->
        <androidx.cardview.widget.CardView
            android:id="@+id/iconCv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:cardCornerRadius="8dp"
            app:cardElevation="0dp"
            app:layout_constraintEnd_toStartOf="@id/contentLL"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <ImageView
                android:id="@+id/iv_ad_icon"
                android:layout_width="52dp"
                android:layout_height="52dp"
                android:scaleType="centerCrop"
                android:src="@android:drawable/ic_menu_info_details" />
        </androidx.cardview.widget.CardView>

        <!-- 广告内容区域 -->
        <LinearLayout
            android:id="@+id/contentLL"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"
            android:orientation="vertical"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/btn_ad_cta"
            app:layout_constraintStart_toEndOf="@id/iconCv"
            app:layout_constraintTop_toTopOf="parent">

            <!-- 广告标题 -->
            <TextView
                android:id="@+id/tv_ad_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:fontFamily="sans-serif-light"
                android:maxLines="1"
                android:text="Test Pangle Ads"
                android:textColor="#333333"
                android:textSize="14sp" />

            <!-- 广告描述（可选，如果需要显示描述） -->
            <TextView
                android:id="@+id/tv_ad_description"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="Test Pangle desc"
                android:textColor="#666666"
                android:textSize="12sp" />
        </LinearLayout>

        <!-- CTA按钮 -->
        <androidx.appcompat.widget.AppCompatTextView
            android:id="@+id/btn_ad_cta"
            android:layout_width="wrap_content"
            android:layout_height="28dp"
            android:background="@drawable/bg_ad_cta_button"
            android:fontFamily="sans-serif-light"
            android:gravity="center"
            android:paddingHorizontal="12dp"
            android:singleLine="true"
            android:text="INSTALL"
            android:textColor="#FFFFFF"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/contentLL"
            app:layout_constraintTop_toTopOf="parent" />

        <!-- 顶部广告Logo容器 -->
        <FrameLayout
            app:layout_constraintBottom_toBottomOf="@id/iconCv"
            app:layout_constraintStart_toStartOf="@id/iconCv"
            app:layout_constraintEnd_toEndOf="@id/iconCv"
            android:id="@+id/fl_ad_logo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

