zoukankan      html  css  js  c++  java
  • facebook原生广告添加adchoice图标

    1、在需要显示adchoice的地方添加一个textview:

    <LinearLayout
        android:id="@+id/ad_ic_action"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:orientation="vertical" />

    2、在请求到facebook广告后,添加如下代码生成adchoice图标:

    LinearLayout adAction = (LinearLayout) ((Activity) context).findViewById(R.id.ad_ic_action);
    if(nativeAd!=null){
        AdChoicesView adChoicesView = new AdChoicesView(context, nativeAd, true);
        adAction.addView(adChoicesView);
    }
  • 相关阅读:
    sobel
    构造函数
    #pragma once & ifnde
    #pragma comment
    SET容器
    重载[] int& operator[ ]( )
    仿函数 operator()()
    remove_if erase
    vector
    map
  • 原文地址:https://www.cnblogs.com/lurenjiashuo/p/facebook-AudienceNetwork-AdChoicesView.html
Copyright © 2011-2022 走看看