2
3 번의 버튼 클릭 수마다 삽입 광고를 어떻게 표시 할 수 있습니까? 여기 내 게임에 내가 RESTART 버튼 여기LibGDX 게임 프레임 워크를 사용하여 Android에서 매 3 번의 클릭에 삽입 광고를 표시하는 방법
에서 간질 쇼를했습니다 핵심 모듈 ... MAIN.java 메인 레이아웃에서 코드
입니다
@Override
public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
super.touchUp(event, x, y, pointer, button);
if (((Act) event.getTarget()).enabled) {
if (event.getTarget().getName().equals("btnRestart")) {
loadScreen("game");
// show AdMob Interstitial
nativePlatform.admobInterstitial();
return;
}
....
}
XML 파일
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<com.google.android.gms.ads.AdView
android:id="@+id/admob"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_centerHorizontal="true"
ads:adUnitId="@string/adMob_banner"
ads:adSize="SMART_BANNER"/>
<FrameLayout
android:id="@+id/app"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
</FrameLayout>
</LinearLayout>
레이아웃에 btn이 없습니다.
덕분에 당신을 도움이 있다면 당신이 대답을 받아 들일 수의 작품을 좋아 <3 – KiiLa
@KiiLa를 아리아. – icarumbas