I have an activity that contain RecycleView with maximum 30 items. Every item contains 2 to 3 text views and 1 button. I have animation on clicking the button.
Before adding admob banner, the performance was really good, scrolling was smooth.
After adding admob banner, the scroll is cutting, clicking the button take a bit to respond. Aditionally, i see message shows me that Too many work on main thread!
Is there any suggestion about how to fix it ? Or what can help making it better ? How can I get smooth scrolling with admob banner enabled?
Hopefully I am not the only one facing this problem!
UPDATE:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:paddingTop="30dp"
android:paddingBottom="64dp"
android:clipToPadding="false"
android:id="@+id/rv_Test"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center|bottom"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id" />
</RelativeLayout>
It Seams that adView
is the problem than
I have replaced the adView
with NativeContentAdView
to use the Native Ads
Now the scroll is smooth
This is the link of the doc https://developers.google.com/admob/android/native
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With