android - Text Editor keyboard overlaps with the recyclerview list -


the layout has recyclerview , text editor @ bottom of view. when click editor, keyboard popup , overlaps recycerview. want recyclerview resized when keyboard brought up. in manifest file have :

   <activity android:name=".commentactivity"                             android:label="yourtime"                            android:windowsoftinputmode="adjustresize">                           </activity> 

my layout looks :

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.recyclerview     android:id="@+id/rv"     android:layout_width="match_parent"     android:layout_height="wrap_content" /> <linearlayout     android:orientation="horizontal"     android:minwidth="25px"     android:minheight="25px"     android:id="@+id/linearlayout1"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:weightsum="100"     android:layout_alignparentbottom="true">     <edittext         android:inputtype="textmultiline"         android:layout_width="0dp"         android:layout_height="match_parent"         android:layout_weight="85"         android:id="@+id/commenteditor"         android:hint="write comment" />     <imagebutton         android:src="@drawable/arrow"         android:layout_width="0dp"         android:layout_height="match_parent"         android:layout_weight="15"         android:id="@+id/send"         android:background="#ffff" /> </linearlayout> 

how make list scroll or resized when keyboard comes up? have tried encapsulate recyclerview inside scrollview didn't work.

this looks like:

enter image description here

i want this:

enter image description here

what should do?

in your

<activity android:name=".commentactivity"                         android:label="yourtime"                        android:windowsoftinputmode="adjustresize|adjustpan">                       </activity> 

you cannot have more 1 of

adjustresize|adjustpan 

the results undefined.

in case, 1 want is

<activity android:name=".commentactivity"                         android:label="yourtime"                        android:windowsoftinputmode="adjustresize"/> 

you can read more here:

activity-element in section covers android:windowsoftinputmode

you should adjust layout recycler view above edit text container.

<android.support.v7.widget.recyclerview      android:id="@+id/rv"      android:layout_width="match_parent"      android:layout_height="match_parent"      android:layout_above="@+id/linearlayout1"/> 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -