My app has a navigation drawer and contains some edittext fields in fragments.
I was trying to add AdView in my activity_main.xml by the below xml code. The AdView floats when Keyboard is enabled, stays ontop of keyboard.
I've added windowSoftInputMode="adjustResize"
on Menifest and even tried getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
in OnCreate() method in activity class but both didn't help.
Any ideas to fix this?
Here is my activity_main.xml layout.
<android.support.v4.widget.DrawerLayout
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:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.neupanedinesh.farefindernepal.MainActivity">
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/navigation_header"
app:menu="@menu/navigation_menu"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
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="KEY">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>