I have a layout and the attribute:
ads:adSize="LARGE_BANNER"
I want to put it with ads:adSize="@dim... dim name"
but it gives me error for example: FULL_BANNER it says something like full banner doesn't exist and it doesn't compile.
I tried it now on styles but it doesn't work too:
<item name="ads:adSize">LEADERBOARD</item>
it says error: A 'type' attribute is required for
any idea?
You can dynamically load the ad's size based on screen resolution, programatically.
In your activity's class onCreate():
If you prefer defining the adview in xml format and referencing the values from the
values-sw600, values-sw720
.. folders you can define the width and height indimens.xml
:In values/dimens.xml
Then, in your layout: