java - AdMob 窃取了 3 个像素?

标签 java android layout

我有这个布局

<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 个像素(在图片中显示为细小的白色方格)。我认为这一点毫无疑问,但我在图像中添加了黑白图案以突出显示我正在谈论的区域。原来它是全黑的。

enter image description here

最佳答案

IIRC,许多广告公司将这些“像素”添加到他们的图像中,以保持广告分销商的诚实。

许多公司出售这项服务 ( example ):他们给你一个像素的图像添加到你的广告中,然后他们可以通过计算加载你的广告的人数来跟踪(独立于 AdMob)他们的 1x1 像素被请求的次数。因此,通过这种方式,广告商可以确保 AdMob 不会夸大广告的观看次数以从广告商那里获得更多 yield 。

在您的特定情况下,这可能不是原因——但这听起来像是一个合理的解释。

关于java - AdMob 窃取了 3 个像素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8933407/

相关文章:

java - 在 Apache HTTP Server 中调用 Java 程序

java - 时间作为 SQL 的关键导致错误

android - 如何使用pushwoosh android native SDK获取regID

android - react native 错误 : Multiple dex files define Lcom/facebook/binaryresource/BinaryResource while generating a production apk

java - 为什么 getPreferredSize() 返回的大小对于此 JDialog 来说太小?

JavaFX:如何使底层节点可访问?

java - 将 Docker 的 splunk 日志驱动程序拆分为多个索引

java - 如何从资源中引用xml文件? eclipse

java - java中如何删除文件中的数字

android - 设置 ImageView 的权重和参数