EDIT: Looks like this bug is the main problem here
In my application's MainActivity I have a custom bottom navigation which is a horizontal recyclerview. I have an access to this recyclerview in all of my Fragments for navigation. The thing is when I focus on an edittext inside my fragment, soft input method moves that recyclerview up, how can I force the screen to pan just for the items in my Fragment's layout.
[![here is my fragment with activity's bottom navigation][2]][2]
[![enter image description here][3]][3]
I tried to put android:windowSoftInputMode="adjustPan"
and then android:windowSoftInputMode="adjustNothing"
to my activity in my Manifest.
then I tried to do those programatically inside my Activity.
then I tried to do the same inside my Fragment this time, nothing helped. Literally no way to make the keyboard ignore the activity.
Main Activity layout:
<?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:background="#d9d5ce"
android:orientation="vertical"
android:focusableInTouchMode="true"
>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/toolbar_background"
android:theme="@style/ToolBarStyle"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:titleTextAppearance="@style/TextAppearance.AppCompat.Subhead" />
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/recycler_view"
android:layout_gravity="center"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</FrameLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_alignParentBottom="true"
android:background="@color/accent"
android:fadingEdge="vertical|horizontal"
android:fadingEdgeLength="60dp"
android:fillViewport="false"
android:requiresFadingEdge="horizontal|vertical"
app:layoutManager="android.support.v7.widget.LinearLayoutManager">
</android.support.v7.widget.RecyclerView>
</RelativeLayout>
Edit: I already tried possible solutions like android:windowSoftInputMode="adjustPan"
the problem is when the edittext inside fragment gain focus, Recyclerview in my activity moves up and I lost pan
FYI: my fragment's root layout is ScrollView