2

enter image description here

<com.google.android.gms.ads.formats.UnifiedNativeAdView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

I want to make MediaView to occupy full width and height according to it. So I used SO solution provided here but problem is that both side's white space is clickable when image asset is portrait. There is no problem in landscape images. But it depends on ad by admob. So is there any solution for that because according to this article

Only the ad titles, URLs, CTA, and image assets can be clickable (no clickable "white" space).

it is policy violation ? How all other developers are resolving it or giving fixed width like 250dp as given in admob official example ? Because it should be dynamic because in tablets, more width devices it is not looking good.

Smeet
  • 3,558
  • 1
  • 28
  • 42

0 Answers0