-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: allow to set template type during runtime #41
Comments
Can you expand further on what you are wanting and your specific use case? Are you asking to construct the template view in code without a xml file ? |
@NVentimiglia Sometimes you load an ad that has media, and sometimes you don't. |
Got it, you would like to define the view in pure Java / Kotlin without the XML file. I will bring this us as a needed enhancement. |
@NVentimiglia It's not necessary without XML, just the part of the "gnt_template_type" , to be set in Java/Kotlin. |
Request recorded. Closing the issue. |
@JillSong Why close? This means it's now possible? |
@AndroidDeveloperLB from https://support.google.com/admob/answer/6240809, the primary image (media view asset) is guaranteed to be returned. It just may not always have video. Are you saying that if the video is not returned, you don't want to render the primary image? The way it's defined, it's expected that you know the size of ad you want to render (that is, you know the space made available from your app) at request time. |
Maybe I misunderstood. Are you ok with specifying it at request time, you just want to be able to do it through code? |
@ericleich What video/image? |
Nevermind, My initial question didn't make sense. Agree with the use case: "I want to create a TemplateView and add it to my view hierarchy programmatically." This would require some API to be able to pass the template type. |
Currently it's available only in layout XML file...
https://developers.google.com/admob/android/native/templates
The text was updated successfully, but these errors were encountered: