Skip to content

Commit 59ab7f2

Browse files
Refactor ad layouts
- Remove FrameLayout wrapper for ad_app_icon in ad_bottom_app_bar.xml and ad_android_studio_list.xml - Increase ad_app_icon size from 40dp to 48dp in all ad layouts
1 parent db5c87f commit 59ab7f2

File tree

5 files changed

+18
-33
lines changed

5 files changed

+18
-33
lines changed

app/src/main/res/layout/ad_android_studio_list.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,12 @@
2626
android:gravity="center_vertical"
2727
android:orientation="horizontal">
2828

29-
<FrameLayout
30-
android:layout_width="120dp"
31-
android:layout_height="120dp"
32-
android:layout_marginEnd="16dp">
33-
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" />
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>
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="16dp"
34+
android:visibility="gone" />
4535

4636
<androidx.appcompat.widget.LinearLayoutCompat
4737
android:layout_width="0dp"

app/src/main/res/layout/ad_bottom_app_bar.xml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,12 @@
1919
android:gravity="center_vertical"
2020
android:orientation="horizontal">
2121

22-
<FrameLayout
23-
android:layout_width="40dp"
24-
android:layout_height="40dp"
25-
android:layout_marginEnd="12dp">
26-
27-
<androidx.appcompat.widget.AppCompatImageView
28-
android:id="@+id/ad_app_icon"
29-
android:layout_width="match_parent"
30-
android:layout_height="match_parent"
31-
android:visibility="gone" />
32-
</FrameLayout>
22+
<androidx.appcompat.widget.AppCompatImageView
23+
android:id="@+id/ad_app_icon"
24+
android:layout_width="48dp"
25+
android:layout_height="48dp"
26+
android:layout_marginEnd="12dp"
27+
android:visibility="gone" />
3328

3429
<androidx.appcompat.widget.LinearLayoutCompat
3530
android:layout_width="0dp"

app/src/main/res/layout/ad_home_banner_small.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
<androidx.appcompat.widget.AppCompatImageView
3333
android:id="@+id/ad_app_icon"
34-
android:layout_width="40dp"
35-
android:layout_height="40dp"
34+
android:layout_width="48dp"
35+
android:layout_height="48dp"
3636
android:layout_marginEnd="16dp" />
3737

3838
<androidx.appcompat.widget.LinearLayoutCompat

app/src/main/res/layout/ad_lesson_code.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
<androidx.appcompat.widget.AppCompatImageView
3131
android:id="@+id/ad_app_icon"
32-
android:layout_width="40dp"
33-
android:layout_height="40dp"
32+
android:layout_width="48dp"
33+
android:layout_height="48dp"
3434
android:layout_marginEnd="16dp" />
3535

3636
<androidx.appcompat.widget.LinearLayoutCompat

app/src/main/res/layout/ad_support.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
<androidx.appcompat.widget.AppCompatImageView
3030
android:id="@+id/ad_app_icon"
31-
android:layout_width="40dp"
32-
android:layout_height="40dp"
31+
android:layout_width="48dp"
32+
android:layout_height="48dp"
3333
android:contentDescription="@null" />
3434

3535
<com.google.android.material.textview.MaterialTextView

0 commit comments

Comments
 (0)