|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 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 | 3 | android:layout_width="match_parent" |
5 | 4 | android:layout_height="wrap_content"> |
6 | 5 |
|
7 | | - <com.google.android.material.card.MaterialCardView |
8 | | - android:id="@+id/ad_card" |
9 | | - style="@style/Widget.Material3.CardView.Outlined" |
| 6 | + <androidx.appcompat.widget.LinearLayoutCompat |
10 | 7 | android:layout_width="match_parent" |
11 | 8 | android:layout_height="wrap_content" |
12 | | - app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.CardViewTopRounded"> |
| 9 | + android:orientation="vertical" |
| 10 | + android:background="?attr/colorSurfaceContainer" |
| 11 | + android:padding="12dp"> |
| 12 | + |
| 13 | + <include layout="@layout/ad_attribution" /> |
13 | 14 |
|
14 | 15 | <androidx.appcompat.widget.LinearLayoutCompat |
15 | 16 | android:layout_width="match_parent" |
16 | 17 | android:layout_height="wrap_content" |
17 | | - android:orientation="vertical" |
18 | | - android:padding="16dp"> |
19 | | - |
20 | | - <include layout="@layout/ad_attribution" /> |
| 18 | + android:layout_marginTop="8dp" |
| 19 | + android:gravity="center_vertical" |
| 20 | + android:orientation="horizontal"> |
21 | 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"> |
| 22 | + <FrameLayout |
| 23 | + android:layout_width="40dp" |
| 24 | + android:layout_height="40dp" |
| 25 | + android:layout_marginEnd="12dp"> |
28 | 26 |
|
29 | | - <FrameLayout |
30 | | - android:layout_width="40dp" |
31 | | - android:layout_height="40dp" |
32 | | - android:layout_marginEnd="12dp"> |
| 27 | + <com.google.android.gms.ads.nativead.MediaView |
| 28 | + android:id="@+id/ad_media" |
| 29 | + android:layout_width="match_parent" |
| 30 | + android:layout_height="match_parent" /> |
33 | 31 |
|
34 | | - <com.google.android.gms.ads.nativead.MediaView |
35 | | - android:id="@+id/ad_media" |
36 | | - android:layout_width="match_parent" |
37 | | - android:layout_height="match_parent" /> |
| 32 | + <androidx.appcompat.widget.AppCompatImageView |
| 33 | + android:id="@+id/ad_app_icon" |
| 34 | + android:layout_width="match_parent" |
| 35 | + android:layout_height="match_parent" |
| 36 | + android:visibility="gone" /> |
| 37 | + </FrameLayout> |
38 | 38 |
|
39 | | - <androidx.appcompat.widget.AppCompatImageView |
40 | | - android:id="@+id/ad_app_icon" |
41 | | - android:layout_width="match_parent" |
42 | | - android:layout_height="match_parent" |
43 | | - android:visibility="gone" /> |
44 | | - </FrameLayout> |
| 39 | + <androidx.appcompat.widget.LinearLayoutCompat |
| 40 | + android:layout_width="0dp" |
| 41 | + android:layout_height="wrap_content" |
| 42 | + android:layout_weight="1" |
| 43 | + android:orientation="vertical"> |
45 | 44 |
|
46 | | - <androidx.appcompat.widget.LinearLayoutCompat |
47 | | - android:layout_width="0dp" |
| 45 | + <com.google.android.material.textview.MaterialTextView |
| 46 | + android:id="@+id/ad_headline" |
| 47 | + android:layout_width="wrap_content" |
48 | 48 | android:layout_height="wrap_content" |
49 | | - android:layout_weight="1" |
50 | | - android:orientation="vertical"> |
51 | | - |
52 | | - <com.google.android.material.textview.MaterialTextView |
53 | | - android:id="@+id/ad_headline" |
54 | | - android:layout_width="wrap_content" |
55 | | - android:layout_height="wrap_content" |
56 | | - android:ellipsize="end" |
57 | | - android:maxLines="1" |
58 | | - android:textAppearance="@style/TextAppearance.Material3.BodyMedium" /> |
59 | | - |
60 | | - <com.google.android.material.textview.MaterialTextView |
61 | | - android:id="@+id/ad_body" |
62 | | - android:layout_width="wrap_content" |
63 | | - android:layout_height="wrap_content" |
64 | | - android:ellipsize="end" |
65 | | - android:maxLines="1" |
66 | | - android:textAppearance="@style/TextAppearance.Material3.BodySmall" /> |
67 | | - </androidx.appcompat.widget.LinearLayoutCompat> |
| 49 | + android:ellipsize="end" |
| 50 | + android:maxLines="1" |
| 51 | + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" /> |
68 | 52 |
|
69 | | - <com.google.android.material.button.MaterialButton |
70 | | - android:id="@+id/ad_call_to_action" |
71 | | - style="@style/Widget.Material3.Button.TextButton" |
| 53 | + <com.google.android.material.textview.MaterialTextView |
| 54 | + android:id="@+id/ad_body" |
72 | 55 | android:layout_width="wrap_content" |
73 | 56 | android:layout_height="wrap_content" |
74 | | - android:layout_marginStart="8dp" |
75 | | - android:minWidth="88dp" |
76 | | - android:minHeight="40dp" /> |
| 57 | + android:ellipsize="end" |
| 58 | + android:maxLines="1" |
| 59 | + android:textAppearance="@style/TextAppearance.Material3.BodySmall" /> |
77 | 60 | </androidx.appcompat.widget.LinearLayoutCompat> |
| 61 | + |
| 62 | + <com.google.android.material.button.MaterialButton |
| 63 | + android:id="@+id/ad_call_to_action" |
| 64 | + style="@style/Widget.Material3.Button.TextButton" |
| 65 | + android:layout_width="wrap_content" |
| 66 | + android:layout_height="wrap_content" |
| 67 | + android:layout_marginStart="8dp" |
| 68 | + android:minWidth="88dp" |
| 69 | + android:minHeight="40dp" /> |
78 | 70 | </androidx.appcompat.widget.LinearLayoutCompat> |
79 | | - </com.google.android.material.card.MaterialCardView> |
| 71 | + </androidx.appcompat.widget.LinearLayoutCompat> |
80 | 72 | </com.google.android.gms.ads.nativead.NativeAdView> |
81 | 73 |
|
0 commit comments