Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upadmob mediation native render bug #22
Comments
This comment has been minimized.
This comment has been minimized.
|
Confirming receipt. Investigating. |
chauduyphanvu1
self-assigned this
Apr 18, 2018
This comment has been minimized.
This comment has been minimized.
|
@rampara Can you take a look and help with this? I quickly checked out the suggested fix and can confirm the issue went away. Was there a recent change in the Mobile Ads SDK that caused this issue? The existing adapter code worked fine previously. |
joshuajplagonera
referenced this issue
May 2, 2018
Merged
Workaround for the AdMob Native Ad rendering issue (#22) #25
chauduyphanvu1
closed this
May 4, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kyba1985 commentedApr 18, 2018
•
edited
Hi , i'm using mopub native render in adapter of recyclerview.
After the first admob native ad is rendered when the app must render the second one the native ad is not shown but is shown only the adv indicator of google.
I think the problem is in the method removeGoogleNativeAdView of GooglePlayServicesAdRenderer.
After a few session of debugger with layout inspector i noticed that this method removes the wrong view from hierarchy to be used on the next bind. The google native app install has a view before che cardview
where is rendered the adv and when this method get the view with:
View actualNativeView = ((ViewGroup) adView).getChildAt(0);
it takes the wrong view.
I fixed it with:
View actualNativeView = ((ViewGroup) adView).getChildAt(1);
(update: i cannot test the native content at this time so i can't know the exactly view hierarchy when content native must be show so i change with this:
View actualNativeView = null; for (int i = 0; i < ((ViewGroup) adView).getChildCount(); i++) { View viewChild = ((ViewGroup) adView).getChildAt(i); if (viewChild instanceof CardView) { actualNativeView = viewChild; break; } })
Check if is a real bug in your class.
i'm using the playservices version 15.0.0