0
我已經設置了正確的權限,並且ID是正確的。佈局不是問題的原因,因爲我可以顯示任何其他視圖(TextView,CheckBox),並且它適合正確的位置。adWhirl根本沒有顯示
任何錯誤或警告顯示在logcat中,只有一行,表示,什麼是錯的是
Sum of ration weights is 0 - no ads to be shown
我以前使用AdMob,但它至少顯示出黑色的空間,在沒有廣告是可用。
這裏是實例的AdWhirl代碼:
LinearLayout layout = (LinearLayout) findViewById(R.id.layout_ad);
AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this, "ID");
RelativeLayout.LayoutParams adWhirlLayoutParams =
new RelativeLayout.LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT
);
adWhirlLayout.setBackgroundColor(Color.BLACK);
adWhirlLayout.setLayoutParams(adWhirlLayoutParams);
AdWhirlTargeting.setTestMode(true);
layout.addView(adWhirlLayout, lparams);
layout.invalidate();
找到了一個辦法,但不得不花費很長時間才能把它放在一起,但現在都很好。 – Demonick
你覺得怎麼做? – danb