java - ScrollView top part is cut off when I added adjustPan so keyboard won't overlap EditText -
i have scrollview (with recyclerview inside) , relativelayout after contains edittext. added
android:windowsoftinputmode="statealwayshidden|adjustpan"
for activity in manifest file because keyboard overlaps edittext in effect, whenever keyboard active, top part of scrollview cut off.
i have tried using nestedscrollview
, setting relativelayout
android:layout_height="wrap_content"
, android:layout_gravity="center"
doesn't work. below snippet of code:
<relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@+id/adview" android:layout_alignparenttop="true" android:background="@android:color/white" android:scrollbars="vertical"> <relativelayout ... </relativelayout> <scrollview android:id="@+id/news_comments" android:fillviewport="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/rl_title"> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/individual_news_item" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingtop="5dp" android:orientation="vertical"> // other layouts <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/individual_news_item" android:orientation="vertical" android:paddingend="15dp" android:paddingleft="15dp" android:paddingright="15dp" android:paddingstart="15dp" android:paddingtop="15dp"> <android.support.v7.widget.recyclerview android:id="@+id/recyclerview" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingtop="15dp" /> </linearlayout> </linearlayout> </scrollview> <relativelayout android:id="@+id/ll_message_actions" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentbottom="true" android:focusable="true" android:focusableintouchmode="true" android:orientation="vertical" android:layout_gravity="center"> <linearlayout android:id="@+id/ll_send_message" android:layout_width="match_parent" android:background="@android:color/white" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_alignparentbottom="true"> <github.ankushsachdeva.emojicon.emojiconedittext android:id="@+id/et_message_text" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="1" android:focusable="true" android:focusableintouchmode="true" android:hint="@string/keymessage" android:inputtype="textmultiline|textnosuggestions" android:background="@android:color/transparent" android:maxlines="4" android:paddingbottom="5dp" android:paddingend="0dp" android:paddingleft="20dp" android:paddingright="0dp" android:paddingstart="20dp" android:paddingtop="5dp" android:textcolor="@color/light_black" android:textcolorhint="@color/zipt" android:textsize="17sp" emojicon:emojiconsize="18sp" /> <imagebutton /> </linearlayout> </relativelayout> </relativelayout>
any ideas how can solve this?
Comments
Post a Comment