Skip to content

Commit ee34e3a

Browse files
committed
Added more contraints on Native Ad template to avoid unexpected button behaviors
1 parent 5b1552e commit ee34e3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/google_mobile_ads/android/src/main/res/layout/gnt_medium_template_view.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,19 @@
200200
android:id="@+id/body"
201201
android:maxLength="90"
202202
android:maxLines="2"
203+
android:ellipsize="end"
203204
app:layout_constraintBottom_toTopOf="@+id/cta"
204205
app:layout_constraintEnd_toEndOf="parent"
205206
app:layout_constraintStart_toStartOf="parent"
206207
app:layout_constraintTop_toBottomOf="@id/middle"
208+
app:layout_constraintHeight_max="50dp"
207209
android:paddingStart="@dimen/gnt_default_margin"
208210
android:layout_marginBottom="@dimen/gnt_small_margin"
209211
/>
210212
<androidx.appcompat.widget.AppCompatButton
211213
android:id="@+id/cta"
212214
android:layout_width="match_parent"
213-
android:layout_height="0dp"
215+
android:layout_height="wrap_content"
214216
android:background="@color/gnt_blue"
215217
android:textColor="@color/gnt_white"
216218
android:layout_marginLeft="5dp"
@@ -221,6 +223,7 @@
221223
app:layout_constraintEnd_toEndOf="parent"
222224
app:layout_constraintStart_toStartOf="parent"
223225
app:layout_constraintTop_toBottomOf="@id/body"
226+
app:layout_constraintHeight_max="50dp"
224227
app:layout_constraintHeight_min="35dp"
225228
/>
226229

0 commit comments

Comments
 (0)