我有这个布局
<LinearLayout android:id="@+id/mainlayout" android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads">
<ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1">
<TableLayout android:id="@+id/tableLayout1" android:layout_width="fill_parent" adroid:layout_height="wrap_content" android:gravity="center_horizontal" >
...
...
</TableLayout>
</ScrollView>
广告添加如下
LinearLayout mainLayout = (LinearLayout)findViewById( R.id.mainlayout );
AdView adView = new AdView(...);
LinearLayout.LayoutParams llParam = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,nearLayout.LayoutParams.WRAP_CONTENT);
llParam.gravity = Gravity.CENTER_HORIZONTAL ;
mainLayout.addView(adView, llParam);
我实在想不通为什么广告下方有 3 个像素(在图片中显示为细小的白色方格)。我认为这一点毫无疑问,但我在图像中添加了黑白图案以突出显示我正在谈论的区域。原来它是全黑的。
最佳答案
IIRC,许多广告公司将这些“像素”添加到他们的图像中,以保持广告分销商的诚实。
许多公司出售这项服务 ( example ):他们给你一个像素的图像添加到你的广告中,然后他们可以通过计算加载你的广告的人数来跟踪(独立于 AdMob)他们的 1x1 像素被请求的次数。因此,通过这种方式,广告商可以确保 AdMob 不会夸大广告的观看次数以从广告商那里获得更多 yield 。
在您的特定情况下,这可能不是原因——但这听起来像是一个合理的解释。
关于java - AdMob 窃取了 3 个像素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8933407/