admob에서 광고를 표시 할 때 레이아웃에 약간의 문제가 있습니다.Android : admob 용 레이아웃 및 admob 새로 고침
앱을 시작할 때 광고가 없으면 모든 것이 정상입니다. 레이아웃은 전체 화면을 차지합니다. 그러면 앱이 광고를로드 할 수있을 때 (상단), 전체 레이아웃이 아래로 이동하여 광고가 표시됩니다.
광고가있을 때 전체 레이아웃이 아래로 이동하지 않으면 훨씬 좋을 것입니다. 즉, 광고가 없을 때 배너 배경에 빈 배경을 예약 할 수있는 코드를 설정하는 방법입니다. 빈 backgorund (및 나머지 레이아웃에 영향을주지) 광고가있을 때 그것은 빈 배경의 위치를 대체하고 나머지 레이아웃은 여전히 원래의 위치에서 해결?
또한 코드 광고에서 refreshInterval = "15000"은 15 초 내에 광고를 새로 고치는 것을 의미합니까? 테스트를 통해 광고가 지정된대로 새로 고침되지 않는 것으로 보입니까?
많은 감사합니다.
코드를 다음과 같이 당신의 AdView가에서
<?xml version="1.0" encoding="utf-8"?>
<TableLayout android:id="@+id/tableLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="*"
android:background="@color/light_green"
android:orientation="vertical"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="123123123"
ads:adSize="BANNER"
ads:refreshInterval="15000"
ads:loadAdOnCreate="true"/>
<TableRow
android:id="@+id/tableRow0"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingRight="8dp" >
...