我正在測試我的版面上的Adview
。如果我把Adview
放在ListView
之前,一切都很好,但如果我把它放在ListView
之後,它就不會顯示出來。爲什麼我不能在ListView之後放置Adview?
怎麼了?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="bottom"
android:background="@android:color/white" />
<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="xxxx"
ads:testDevices="xxxx" />
</LinearLayout>
太棒了!謝謝@ K-ballo,我試過這段代碼,但我認爲我必須在AdView上使用它。現在工作正常。 – eskalera
這工作安排用戶界面,但一旦廣告加載並顯示ListView滾動到數據的底部:-( –
'android:transcriptMode'應該被禁用:-)現在它不再滾動 –