|
14 | 14 | app:cardUseCompatPadding="false" |
15 | 15 | app:cardPreventCornerOverlap="true"> |
16 | 16 |
|
17 | | - <androidx.constraintlayout.widget.ConstraintLayout |
18 | | - android:id="@+id/ad_host" |
| 17 | + <LinearLayout |
19 | 18 | android:layout_width="match_parent" |
20 | 19 | android:layout_height="wrap_content" |
| 20 | + android:orientation="vertical" |
21 | 21 | android:padding="16dp"> |
22 | 22 |
|
23 | | - <FrameLayout |
24 | | - android:id="@+id/ad_attr_container" |
25 | | - android:layout_width="wrap_content" |
26 | | - android:layout_height="wrap_content" |
27 | | - android:layout_marginBottom="8dp" |
28 | | - app:layout_constraintTop_toTopOf="parent" |
29 | | - app:layout_constraintStart_toStartOf="parent" |
30 | | - app:layout_constraintEnd_toEndOf="parent"> |
| 23 | + <include layout="@layout/ad_attribution" /> |
31 | 24 |
|
32 | | - <include layout="@layout/ad_attribution" /> |
33 | | - </FrameLayout> |
| 25 | + <androidx.constraintlayout.widget.ConstraintLayout |
| 26 | + android:id="@+id/ad_host" |
| 27 | + android:layout_width="match_parent" |
| 28 | + android:layout_height="wrap_content" |
| 29 | + android:layout_marginTop="8dp"> |
34 | 30 |
|
35 | | - <com.google.android.material.card.MaterialCardView |
36 | | - android:id="@+id/media_card" |
37 | | - android:layout_width="96dp" |
38 | | - android:layout_height="96dp" |
39 | | - android:layout_marginTop="8dp" |
40 | | - app:cardCornerRadius="16dp" |
41 | | - app:cardUseCompatPadding="false" |
42 | | - app:cardPreventCornerOverlap="true" |
43 | | - app:layout_constraintTop_toBottomOf="@id/ad_attr_container" |
44 | | - app:layout_constraintStart_toStartOf="parent"> |
| 31 | + <com.google.android.material.card.MaterialCardView |
| 32 | + android:id="@+id/media_card" |
| 33 | + android:layout_width="96dp" |
| 34 | + android:layout_height="96dp" |
| 35 | + app:cardCornerRadius="16dp" |
| 36 | + app:cardUseCompatPadding="false" |
| 37 | + app:cardPreventCornerOverlap="true" |
| 38 | + app:layout_constraintTop_toTopOf="parent" |
| 39 | + app:layout_constraintStart_toStartOf="parent"> |
45 | 40 |
|
46 | | - <com.google.android.gms.ads.nativead.MediaView |
47 | | - android:id="@+id/ad_media" |
48 | | - android:layout_width="match_parent" |
49 | | - android:layout_height="match_parent" /> |
50 | | - </com.google.android.material.card.MaterialCardView> |
| 41 | + <com.google.android.gms.ads.nativead.MediaView |
| 42 | + android:id="@+id/ad_media" |
| 43 | + android:layout_width="match_parent" |
| 44 | + android:layout_height="match_parent" /> |
| 45 | + </com.google.android.material.card.MaterialCardView> |
51 | 46 |
|
52 | | - <TextView |
53 | | - android:id="@+id/ad_headline" |
54 | | - android:layout_width="0dp" |
55 | | - android:layout_height="wrap_content" |
56 | | - android:layout_marginStart="12dp" |
57 | | - android:ellipsize="end" |
58 | | - android:maxLines="1" |
59 | | - android:textAppearance="@style/TextAppearance.Material3.TitleMedium" |
60 | | - app:layout_constraintTop_toTopOf="@id/media_card" |
61 | | - app:layout_constraintStart_toEndOf="@id/media_card" |
62 | | - app:layout_constraintEnd_toEndOf="parent" /> |
| 47 | + <TextView |
| 48 | + android:id="@+id/ad_headline" |
| 49 | + android:layout_width="0dp" |
| 50 | + android:layout_height="wrap_content" |
| 51 | + android:layout_marginStart="12dp" |
| 52 | + android:ellipsize="end" |
| 53 | + android:maxLines="1" |
| 54 | + android:textAppearance="@style/TextAppearance.Material3.TitleMedium" |
| 55 | + app:layout_constraintTop_toTopOf="@id/media_card" |
| 56 | + app:layout_constraintStart_toEndOf="@id/media_card" |
| 57 | + app:layout_constraintEnd_toEndOf="parent" /> |
63 | 58 |
|
64 | | - <TextView |
65 | | - android:id="@+id/ad_body" |
66 | | - android:layout_width="0dp" |
67 | | - android:layout_height="wrap_content" |
68 | | - android:layout_marginTop="4dp" |
69 | | - android:ellipsize="end" |
70 | | - android:maxLines="2" |
71 | | - android:textAppearance="@style/TextAppearance.Material3.BodySmall" |
72 | | - app:layout_constraintTop_toBottomOf="@id/ad_headline" |
73 | | - app:layout_constraintStart_toStartOf="@id/ad_headline" |
74 | | - app:layout_constraintEnd_toEndOf="@id/ad_headline" /> |
| 59 | + <TextView |
| 60 | + android:id="@+id/ad_body" |
| 61 | + android:layout_width="0dp" |
| 62 | + android:layout_height="wrap_content" |
| 63 | + android:layout_marginTop="4dp" |
| 64 | + android:ellipsize="end" |
| 65 | + android:maxLines="2" |
| 66 | + android:textAppearance="@style/TextAppearance.Material3.BodySmall" |
| 67 | + app:layout_constraintTop_toBottomOf="@id/ad_headline" |
| 68 | + app:layout_constraintStart_toStartOf="@id/ad_headline" |
| 69 | + app:layout_constraintEnd_toEndOf="@id/ad_headline" /> |
75 | 70 |
|
76 | | - <RatingBar |
77 | | - android:id="@+id/ad_stars" |
78 | | - style="@style/Widget.Material3.RatingBar.Small" |
79 | | - android:layout_width="wrap_content" |
80 | | - android:layout_height="wrap_content" |
81 | | - android:isIndicator="true" |
82 | | - android:numStars="5" |
83 | | - android:stepSize="0.5" |
84 | | - android:layout_marginTop="8dp" |
85 | | - app:layout_constraintTop_toBottomOf="@id/ad_body" |
86 | | - app:layout_constraintStart_toStartOf="@id/ad_headline" |
87 | | - app:layout_constraintBottom_toBottomOf="parent" /> |
| 71 | + <me.zhanghai.android.materialratingbar.MaterialRatingBar |
| 72 | + android:id="@+id/ad_stars" |
| 73 | + style="@style/Widget.MaterialRatingBar.RatingBar" |
| 74 | + android:layout_width="wrap_content" |
| 75 | + android:layout_height="wrap_content" |
| 76 | + android:isIndicator="true" |
| 77 | + android:numStars="5" |
| 78 | + android:stepSize="0.5" |
| 79 | + android:layout_marginTop="8dp" |
| 80 | + app:layout_constraintTop_toBottomOf="@id/ad_body" |
| 81 | + app:layout_constraintStart_toStartOf="@id/ad_headline" |
| 82 | + app:layout_constraintBottom_toBottomOf="parent" /> |
88 | 83 |
|
89 | | - <com.google.android.material.button.MaterialButton |
90 | | - android:id="@+id/ad_call_to_action" |
91 | | - style="@style/Widget.Material3.Button.FilledTonalButton" |
92 | | - android:layout_width="wrap_content" |
93 | | - android:layout_height="40dp" |
94 | | - android:minWidth="88dp" |
95 | | - android:insetTop="0dp" |
96 | | - android:insetBottom="0dp" |
97 | | - android:layout_marginStart="12dp" |
98 | | - app:layout_constraintBaseline_toBaselineOf="@id/ad_stars" |
99 | | - app:layout_constraintEnd_toEndOf="parent" /> |
| 84 | + <com.google.android.material.button.MaterialButton |
| 85 | + android:id="@+id/ad_call_to_action" |
| 86 | + android:layout_width="wrap_content" |
| 87 | + android:layout_height="40dp" |
| 88 | + android:minWidth="88dp" |
| 89 | + android:insetTop="0dp" |
| 90 | + android:insetBottom="0dp" |
| 91 | + android:layout_marginStart="12dp" |
| 92 | + app:layout_constraintBaseline_toBaselineOf="@id/ad_stars" |
| 93 | + app:layout_constraintEnd_toEndOf="parent" /> |
100 | 94 |
|
101 | | - </androidx.constraintlayout.widget.ConstraintLayout> |
| 95 | + </androidx.constraintlayout.widget.ConstraintLayout> |
| 96 | + </LinearLayout> |
102 | 97 | </com.google.android.material.card.MaterialCardView> |
103 | 98 | </com.google.android.gms.ads.nativead.NativeAdView> |
| 99 | + |
0 commit comments