|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<com.google.android.gms.ads.nativead.NativeAdView xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
| 4 | + android:layout_width="match_parent" |
| 5 | + android:layout_height="wrap_content"> |
| 6 | + |
| 7 | + <com.google.android.material.card.MaterialCardView |
| 8 | + android:id="@+id/ad_card" |
| 9 | + style="@style/Widget.Material3.CardView.Filled" |
| 10 | + android:layout_width="match_parent" |
| 11 | + android:layout_height="wrap_content" |
| 12 | + app:cardCornerRadius="20dp"> |
| 13 | + |
| 14 | + <androidx.appcompat.widget.LinearLayoutCompat |
| 15 | + android:layout_width="match_parent" |
| 16 | + android:layout_height="wrap_content" |
| 17 | + android:orientation="vertical" |
| 18 | + android:padding="16dp"> |
| 19 | + |
| 20 | + <include layout="@layout/ad_attribution" /> |
| 21 | + |
| 22 | + <androidx.appcompat.widget.LinearLayoutCompat |
| 23 | + android:layout_width="match_parent" |
| 24 | + android:layout_height="wrap_content" |
| 25 | + android:layout_marginTop="8dp" |
| 26 | + android:gravity="center_vertical" |
| 27 | + android:orientation="horizontal"> |
| 28 | + |
| 29 | + <androidx.appcompat.widget.AppCompatImageView |
| 30 | + android:id="@+id/ad_app_icon" |
| 31 | + android:layout_width="48dp" |
| 32 | + android:layout_height="48dp" |
| 33 | + android:layout_marginEnd="12dp" |
| 34 | + android:contentDescription="@null" |
| 35 | + android:visibility="gone" /> |
| 36 | + |
| 37 | + <androidx.appcompat.widget.LinearLayoutCompat |
| 38 | + android:layout_width="0dp" |
| 39 | + android:layout_height="wrap_content" |
| 40 | + android:layout_weight="1" |
| 41 | + android:orientation="vertical"> |
| 42 | + |
| 43 | + <com.google.android.material.textview.MaterialTextView |
| 44 | + android:id="@+id/ad_headline" |
| 45 | + android:layout_width="wrap_content" |
| 46 | + android:layout_height="wrap_content" |
| 47 | + android:ellipsize="end" |
| 48 | + android:maxLines="1" |
| 49 | + android:textAppearance="@style/TextAppearance.Material3.TitleMedium" /> |
| 50 | + |
| 51 | + <com.google.android.material.textview.MaterialTextView |
| 52 | + android:id="@+id/ad_body" |
| 53 | + android:layout_width="wrap_content" |
| 54 | + android:layout_height="wrap_content" |
| 55 | + android:ellipsize="end" |
| 56 | + android:maxLines="2" |
| 57 | + android:textAppearance="@style/TextAppearance.Material3.BodySmall" /> |
| 58 | + |
| 59 | + </androidx.appcompat.widget.LinearLayoutCompat> |
| 60 | + |
| 61 | + <com.google.android.material.button.MaterialButton |
| 62 | + android:id="@+id/ad_call_to_action" |
| 63 | + style="@style/Widget.Material3.Button.FilledTonalButton" |
| 64 | + android:layout_width="wrap_content" |
| 65 | + android:layout_height="wrap_content" |
| 66 | + android:layout_marginStart="12dp" |
| 67 | + android:minWidth="88dp" /> |
| 68 | + </androidx.appcompat.widget.LinearLayoutCompat> |
| 69 | + |
| 70 | + <com.google.android.material.card.MaterialCardView |
| 71 | + android:id="@+id/media_card" |
| 72 | + style="@style/Widget.Material3.CardView.Outlined" |
| 73 | + android:layout_width="match_parent" |
| 74 | + android:layout_height="180dp" |
| 75 | + android:layout_marginTop="12dp" |
| 76 | + app:cardCornerRadius="16dp"> |
| 77 | + |
| 78 | + <FrameLayout |
| 79 | + android:layout_width="match_parent" |
| 80 | + android:layout_height="match_parent"> |
| 81 | + |
| 82 | + <com.google.android.gms.ads.nativead.MediaView |
| 83 | + android:id="@+id/ad_media" |
| 84 | + android:layout_width="match_parent" |
| 85 | + android:layout_height="match_parent" |
| 86 | + android:scaleType="centerCrop" /> |
| 87 | + |
| 88 | + <com.google.android.gms.ads.nativead.AdChoicesView |
| 89 | + android:id="@+id/ad_choices" |
| 90 | + android:layout_width="wrap_content" |
| 91 | + android:layout_height="wrap_content" |
| 92 | + android:layout_gravity="top|end" |
| 93 | + android:layout_margin="8dp" /> |
| 94 | + </FrameLayout> |
| 95 | + </com.google.android.material.card.MaterialCardView> |
| 96 | + </androidx.appcompat.widget.LinearLayoutCompat> |
| 97 | + </com.google.android.material.card.MaterialCardView> |
| 98 | +</com.google.android.gms.ads.nativead.NativeAdView> |
0 commit comments