I'm using this code to create a native ad:
I get his result:
How I can fit the image instead fill (without distortion)?
I saw this thread, but I don't know how to use it in this code:
Thanks in advance for any tip.
[Solved] Native Ads Advanced with MediaView
Like @Douglas Farias says in this post: https://www.b4x.com/android/forum/threads/any-news-about-native-ads-advanced.88100/page-3#post-610000 the native ads advanced will need to use the MediaView. I know that this ads is not release to all users, but it works to some ones. How I can use the...
www.b4x.com
B4X:
Dim images As List = NativeUnifiedAd.RunMethod("getImages", Null)
If images.IsInitialized And images.Size > 0 Then
Dim imgView As Panel = pAdmob.GetView(5) 'example
Dim image As JavaObject = images.Get(0)
imgView.Background = image.RunMethod("getDrawable", Null)
NativeUnifiedAdView.RunMethod("setImageView", Array(imgView))
End If
How I can fit the image instead fill (without distortion)?
I saw this thread, but I don't know how to use it in this code:
[B4X][XUI] Fill and Fit images without distortion
Don't use this code. Better solution in B4XImageView (XUI Views) (https://www.b4x.com/android/forum/threads/b4x-b4ximageview-imageview-resize-modes.121359/#content)
www.b4x.com
Thanks in advance for any tip.