newGame是xml中的一个按钮,单击newGame就会运行。
<Button
android:id="@+id/button1"
android:layout_width="130dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="1dp"
android:layout_marginLeft="1dp"
android:onClick="newGame"
android:text="@string/newgame" />
public void newGame(View view) {
if (startAppAd != null){
startAppAd.show();
startAppAd = null;
}
Intent intent = new Intent(this,MainActivity.class);
startActivity(intent);
finish();
}
问题是,广告会出现在上面的配置中吗。还是直接开始下一个活动??如果没有,请建议点击按钮显示广告的方式&之后开始新的活动。提前感谢
(我在模拟器中尝试过,但没有显示,我不知道问题是否是因为互联网)
Impression将在那里,但我们将无法看到它,因为没有暂停。