在Android上显示广告



我必须使用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(); 
          } 
          //});
      });

我在另一台机器上给了另一个应用程序的一个插件,但我仍然没有得到任何插件。。每个应用程序的加载项是唯一的吗;每台机器???请帮帮我。

使用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"/>

这是你要找的职位。。

最新更新