Saturday, March 8, 2014
Help FrameLayout.LayoutParams hiding method
I added rice and advertising platform code. Help. . Documents written only recall method did not write off or hiding method
First, I use cocos2d-x jni call programs written using java code
Advertising by the following method call
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams (
FrameLayout.LayoutParams.FILL_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT);
/ / Set the banner suspended position
layoutParams.gravity = Gravity.BOTTOM | Gravity.RIGHT; / / Here is an example of the bottom right corner
/ / Instantiate banner
AdView adView = new AdView (instance, AdSize.FIT_SCREEN);
/ / Call the function
Activity of addContentViewinstance.addContentView (adView, layoutParams);
/ / (FrameLayout.layoutParams) removeView (adView);.
Because this code only needs to be displayed in a page so close method for hidden method or when you need to re-appear in
Seeking methods. . Online. .
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Hide is inVisible
Displayed is visibale
View property is set on the line visbile
Reply:
The above code is the code I wrote in onCreate inside
You said that this method can actually wrote me an example?
For example
void closeAd () {
...... / / Here is the implementation
}
Reply:
addView.setVisible (VIEW.inVisible);
Show on set as visbile
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment