Здравствуйте.
Второй день не могу решить проблему. При запуске активности блок с рекламой встает по центру, как задумано. Но при повороте экрана на 90 градусов, блок съезжает в бок. Поворачиваю еще раз, все встает на место и т.д. Причем не важно с какого положения стартовала активити, портрет или ландшафт.


<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <LinearLayout android:id="@+id/bannerLayout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_marginTop="3dp" android:background="@android:color/transparent" android:gravity="center" android:orientation="horizontal"> <com.google.android.gms.ads.AdView android:id="@+id/myAdView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#FFFFFF" app:adSize="SMART_BANNER" app:adUnitId="ca-app-pub-3940256099942544/6300978111" /> </LinearLayout> <androidx.recyclerview.widget.RecyclerView android:id="@+id/mRecycleView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/bannerLayout" android:scrollbars="vertical" android:layout_marginTop="15dp" android:layout_marginBottom="10dp" /> </RelativeLayout>
В манифесте: android:configChanges="orientation|screenSize"
Может кто-нибудь помочь?