2012-07-23 103 views
0

我必須在屏幕底部顯示廣告,使用leadboltcontroller jar..I已經實現了代碼,並且我還給出了所有權限集合。但我沒有收到任何廣告。這裏是我的代碼:在Android上顯示廣告

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

我已經給另一個應用程序的一個ADDID在另一臺機器,但仍我沒有得到任何addid..Is的ADDID唯一針對每臺計算機的每個應用程序& ???請幫我。

回答

0

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

here的頁腳位置是您正在尋找的職位..