我正在尝试在屏幕底部实施AdMob广告,但该广告与UI按钮重叠。 我也尝试过smart_banner,但仍然无法正常工作。我已附上屏幕截图enter image description here,请检查并告知我正确的解决方案。 正确的图片应该是这样的。enter image description here
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.sothree.slidinguppanel.SlidingUpPanelLayout
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoOverlay="false"
sothree:umanoPanelHeight="0dp"
android:layout_above="@+id/banner_container"
sothree:umanoShadowHeight="@dimen/card_elevation">
<FrameLayout
android:id="@+id/content_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<FrameLayout
android:id="@+id/sliding_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:colorBackground">
<FrameLayout
android:id="@+id/player_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<fragment
android:id="@+id/mini_player_fragment"
class="shubham.kajaria.musicplayer.ui.fragments.player.MiniPlayerFragment"
android:layout_width="match_parent"
android:layout_height="@dimen/mini_player_height" />
</FrameLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/banner_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
ads:adSize="BANNER"
android:visibility="visible"
ads:adUnitId="@string/ad_mob">
</com.google.android.gms.ads.AdView>
</RelativeLayout>