Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Android上显示广告_Android_Leadbolt - Fatal编程技术网

在Android上显示广告

在Android上显示广告,android,leadbolt,Android,Leadbolt,我必须使用leadboltcontrollerjar在屏幕底部显示一则广告。我已经实现了代码,并且还授予了所有权限集。但我没有收到任何广告。这是我的密码: public class Leadbolt_DemoActivity extends Activity { /** Called when the activity is first created. */ private AdController mucontroller; private String MY_LB

我必须使用
leadboltcontroller
jar在屏幕底部显示一则广告。我已经实现了代码,并且还授予了所有权限集。但我没有收到任何广告。这是我的密码:

public class Leadbolt_DemoActivity extends Activity {
    /** Called when the activity is first created. */

    private AdController mucontroller;
    private String MY_LB_SECTION_ID="328886602";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
      RelativeLayout rlbottom=(RelativeLayout)findViewById(R.id.relbottom);
      final Activity act = this;  
      rlbottom.post(new Runnable() {

          public void run() { 
              mucontroller = new AdController(act, MY_LB_SECTION_ID); 
              mucontroller.setAsynchTask(true);

              mucontroller.loadNotification();
              mucontroller.setAdditionalDockingMargin(50);
              mucontroller.loadAd(); 
          } 
          //});
      });

我在另一台机器上给了另一个应用程序的一个ADDD,但我仍然没有得到任何ADDD。每个应用程序和每台机器的ADDD是唯一的吗???请帮助我。

使用
Relativelayout
进行广告的页脚定位

 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
<bla.bla.AdView
        android:id="@+id/ad"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="#FF0000"/>
<ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_above="@id/ad"/>

是你要找的职位