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);
}

 

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2021-12-09
  • 2021-06-21
  • 2021-07-12
  • 2021-08-26
  • 2021-04-21
猜你喜欢
  • 2021-07-05
  • 2021-05-21
  • 2021-12-19
  • 2021-04-28
  • 2022-12-23
  • 2021-04-24
  • 2021-09-28
相关资源
相似解决方案