[英]Show an advertisement on Android
I have to show an advertisment on the bottom of the screen using leadboltcontroller
jar..I have implemented the code and I have given all the sets of permissions as well. 我必须使用
leadboltcontroller
jar在屏幕底部显示广告。我已经实现了代码,并且还提供了所有权限集。 But I am not getting any advertisment. 但是我没有得到任何广告。 Here is my code:
这是我的代码:
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();
}
//});
});
I have given one addid of another app in another machine but still i am not getting any addid..Is the addid unique for each app & for each machine???Please help me. 我已经在另一台机器上给了另一个应用程序的一个addid,但是我仍然没有得到任何addid。.每个应用程序和每台机器的addid是唯一的吗?请帮助我。
use Relativelayout
for footer positioning of ads 使用
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"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.