sorry to bother you with this simple question, but I’m not able to find in internet tha answer because seems the answer outdated…
I’d like to add a webview programmatically on a top of a cocos2d 2.1.4 layer…
I had found this answer (even if it is not a webview):
LinearLayout.LayoutParams adParams = new LinearLayout.LayoutParams(
getWindowManager().getDefaultDisplay().getWidth(),
getWindowManager().getDefaultDisplay().getHeight()+getWindowManager().getDefaultDisplay().getHeight()-50);
adView = new AdView(SimpleGame.this, AdSize.BANNER, "your Ad ID");
adView.setAdListener(SimpleGame.this);
AdRequest request = new AdRequest();
request.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(request);
CCDirector.sharedDirector().getActivity().addContentView(adView,adParams);
however getActivity is not inside cocos2dx anymore…
there is some tutorial on this topic?
I think that is a problem faced from all programmers soon or later…
please help…
thanks