|
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 | + <LinearLayout |
| 7 | + android:id="@+id/ad_host" |
10 | 8 | android:layout_width="match_parent" |
11 | 9 | android:layout_height="wrap_content" |
12 | | - app:cardUseCompatPadding="false" |
13 | | - app:cardPreventCornerOverlap="true"> |
| 10 | + android:orientation="vertical" |
| 11 | + android:background="?attr/colorSurfaceContainer" |
| 12 | + android:paddingHorizontal="16dp"> |
| 13 | + |
| 14 | + <include |
| 15 | + android:layout_width="wrap_content" |
| 16 | + android:layout_height="wrap_content" |
| 17 | + android:layout_marginTop="4dp" |
| 18 | + layout="@layout/ad_attribution" /> |
14 | 19 |
|
15 | 20 | <LinearLayout |
16 | | - android:id="@+id/ad_host" |
17 | 21 | android:layout_width="match_parent" |
18 | 22 | android:layout_height="wrap_content" |
19 | | - android:orientation="vertical" |
20 | | - android:background="?attr/colorSurfaceContainer" |
21 | | - android:paddingStart="16dp" |
22 | | - android:paddingEnd="16dp" |
23 | | - android:paddingTop="12dp" |
24 | | - android:paddingBottom="12dp"> |
| 23 | + android:gravity="center_vertical" |
| 24 | + android:orientation="horizontal"> |
25 | 25 |
|
26 | | - <include layout="@layout/ad_attribution" /> |
| 26 | + <androidx.appcompat.widget.AppCompatImageView |
| 27 | + android:id="@+id/ad_app_icon" |
| 28 | + android:layout_width="32dp" |
| 29 | + android:layout_height="32dp" |
| 30 | + android:layout_marginEnd="12dp" /> |
27 | 31 |
|
28 | 32 | <LinearLayout |
29 | | - android:layout_width="match_parent" |
| 33 | + android:layout_width="0dp" |
30 | 34 | android:layout_height="wrap_content" |
31 | | - android:gravity="center_vertical" |
32 | | - android:orientation="horizontal"> |
| 35 | + android:layout_weight="1" |
| 36 | + android:orientation="vertical"> |
33 | 37 |
|
34 | | - <ImageView |
35 | | - android:id="@+id/ad_app_icon" |
36 | | - android:layout_width="32dp" |
37 | | - android:layout_height="32dp" |
38 | | - android:layout_marginEnd="12dp" /> |
39 | | - |
40 | | - <LinearLayout |
41 | | - android:layout_width="0dp" |
| 38 | + <TextView |
| 39 | + android:id="@+id/ad_headline" |
| 40 | + android:layout_width="wrap_content" |
42 | 41 | android:layout_height="wrap_content" |
43 | | - android:layout_weight="1" |
44 | | - android:orientation="vertical"> |
| 42 | + android:ellipsize="end" |
| 43 | + android:maxLines="1" |
| 44 | + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" /> |
45 | 45 |
|
46 | | - <TextView |
47 | | - android:id="@+id/ad_headline" |
48 | | - android:layout_width="wrap_content" |
49 | | - android:layout_height="wrap_content" |
50 | | - android:ellipsize="end" |
51 | | - android:maxLines="1" |
52 | | - android:textAppearance="@style/TextAppearance.Material3.BodyMedium" /> |
53 | | - |
54 | | - <TextView |
55 | | - android:id="@+id/ad_body" |
56 | | - android:layout_width="wrap_content" |
57 | | - android:layout_height="wrap_content" |
58 | | - android:ellipsize="end" |
59 | | - android:maxLines="1" |
60 | | - android:textAppearance="@style/TextAppearance.Material3.BodySmall" /> |
61 | | - </LinearLayout> |
62 | | - |
63 | | - <com.google.android.material.button.MaterialButton |
64 | | - android:id="@+id/ad_call_to_action" |
65 | | - style="@style/Widget.Material3.Button.TextButton" |
| 46 | + <TextView |
| 47 | + android:id="@+id/ad_body" |
66 | 48 | android:layout_width="wrap_content" |
67 | 49 | android:layout_height="wrap_content" |
68 | | - android:minWidth="88dp" |
69 | | - android:minHeight="40dp" |
70 | | - android:layout_marginStart="8dp" /> |
| 50 | + android:ellipsize="end" |
| 51 | + android:maxLines="1" |
| 52 | + android:textAppearance="@style/TextAppearance.Material3.BodySmall" /> |
71 | 53 | </LinearLayout> |
| 54 | + |
| 55 | + <com.google.android.material.button.MaterialButton |
| 56 | + android:id="@+id/ad_call_to_action" |
| 57 | + style="@style/Widget.Material3.Button.TextButton" |
| 58 | + android:layout_width="wrap_content" |
| 59 | + android:layout_height="wrap_content" |
| 60 | + android:minWidth="88dp" |
| 61 | + android:minHeight="40dp" |
| 62 | + android:layout_marginStart="8dp" /> |
72 | 63 | </LinearLayout> |
73 | | - </com.google.android.material.card.MaterialCardView> |
| 64 | + </LinearLayout> |
74 | 65 | </com.google.android.gms.ads.nativead.NativeAdView> |
0 commit comments