admob - google Adview in Android - how to set disabled in xml -


i have situation disable adview , prefer xml. adview looks in layout file:

  <com.google.android.gms.ads.adview         android:id="@+id/adview"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         ads:adsize="banner"         ads:adunitid="ca-app-pub-12345678934343/85666666"> 

how can disable ? 1 way wrap around linearlayout , hide layout want disable actual network call too, there attribute in adview can use etc ? necessary xml because im going incorporate data binding turn ad on , off.

how can disable ?

as long don't call method load ad similar disabled. not display ad.

one way wrap around linearlayout , hide layout want disable actual network call too, there attribute in adview can use etc ?

it view. common attributes visibility, width, height, gravity etc applicable well.

its necessary xml because im going incorporate data binding turn ad on , off.

no can without xml. create adview in java code , attach layout. can detach it.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -