It looks like you're new here. If you want to get involved, click one of these buttons!
public class DrunkandRollActivity extends Activity implements OnTouchListener { static { System.loadLibrary("gideros"); System.loadLibrary("luasocket"); System.loadLibrary("lfs"); System.loadLibrary("facebook"); } static private String[] externalClasses = { "com.giderosmobile.android.plugins.facebook.GFacebook", }; private GLSurfaceView mGLView; private AdLayout adView; // The ad view used to load and display the ad. // Tag used to prefix all log messages private boolean mHasFocus = false; private boolean mPlaying = false; <a href="https://forum.giderosmobile.com/profile/Override" rel="nofollow">@Override</a> public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGLView = new GiderosGLSurfaceView(this); //setContentView(mGLView); mGLView.setOnTouchListener(this); setContentView(R.layout.main); // AdRegistration.setAppKey("0123456789ABCDEF0123456789ABCDEF"); AdRegistration.setAppKey("sample-app-v1_pub-2"); // AdRegistration.enableLogging(true); // For debugging purposes flag all ad requests as tests, but set to false for production builds AdRegistration.enableTesting(true); // Programmatically create the AmazonAdLayout this.adView = new AdLayout(this); FrameLayout layout = (FrameLayout) findViewById(R.id.layout_main); // Set the correct width and height of the ad. FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.MATCH_PARENT , FrameLayout.LayoutParams.MATCH_PARENT , Gravity.BOTTOM); layout.addView(mGLView); layout.addView(this.adView,lp); // If you declared AdLayout in your xml you would instead // replace the 3 lines above with the following line // this.adView = (AdLayout) findViewById( R.id.adview ); this.adView.loadAd(new AdTargetingOptions()); // async task to retrieve an ad |
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="<a href="http://schemas.android.com/apk/res/android"" rel="nofollow">http://schemas.android.com/apk/res/android"</a>; android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="bottom" android:id="<a href="https://forum.giderosmobile.com/profile/%2Bid%2Flayout_main%26quot" rel="nofollow">@+id/layout_main"</a>; > </FrameLayout> |
Likes: larf
Comments
Match_Parent maybe change it to WRAP_CONTENT.
I am thinking it is blocking your main view (gideros view) and you can see the buttons but events are not catched by gideros hence add is matching the parent and blocking it.
Change the java code like this:
- with WRAP_CONTENT value it doesn't show any ad.. I would agree but I've just only tried @ar2rsawseen's solution for Admob, which is similar:
ps. you forgot to add quatation marks at pre lang="java"
https://play.google.com/store/apps/developer?id=My+name+is+Originality
hmm for your question need to think deeply :-B
Likes: fxone