I'm trying to set an AdMob Banner for my app. In my Activity I've got a ListView, so I need to put the Banner on the bottom of it. The admob banner appears in the middle of the screen. How to fix it in the bottom of the screen?
Here is the code:
<!-- Framelayout to display Fragments -->
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- Listview to display slider menu -->
<ListView
android:id="@+id/list_slidermenu"
android:layout_width="270dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@drawable/sidebar_gradient"
android:choiceMode="singleChoice"
android:divider="@color/white_60_per_trans"
android:dividerHeight="0.5dp" />
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id">
</com.google.android.gms.ads.AdView>
Copyright Notice:Content Author:「H. Tiwari」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/34178398/set-admob-banner-at-the-bottom-of-the-screen-view