콘텐츠 메인 - 광고 위치 수정

This commit is contained in:
klaus 2023-09-15 23:17:28 +09:00
parent e3679fd1dc
commit 62fc0e1d59
2 changed files with 9 additions and 13 deletions

View File

@ -28,7 +28,7 @@ class AudioContentMainCurationAdapter(
binding.tvDesc.text = item.description
setAudioContentList(item.audioContents)
if (index % 2 != 0) {
if (index % 3 == 2) {
setupAdMob()
} else {
binding.adView.visibility = View.GONE

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -55,17 +54,6 @@
android:layout_marginTop="6.7dp"
android:layout_marginBottom="40dp" />
<com.google.android.gms.ads.AdView
android:id="@+id/ad_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="13.3dp"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/admob_curation_banner_unit_id"
app:layout_constraintEnd_toEndOf="@+id/tv_title"
app:layout_constraintStart_toStartOf="@+id/tv_title"
app:layout_constraintTop_toBottomOf="@+id/rv_curation" />
<LinearLayout
android:id="@+id/ll_my_stash"
android:layout_width="match_parent"
@ -141,6 +129,14 @@
android:paddingHorizontal="13.3dp" />
</LinearLayout>
<com.google.android.gms.ads.AdView
android:id="@+id/ad_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/admob_curation_banner_unit_id" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_curation"
android:layout_width="match_parent"