android softkeyboard - Keyboard Overlaps Edittext - Activity Fullscreen -


i working on chat application edittext , send button @ bottom. activity fullscreen, hidden navigation , status bar. need push edittext , send button when keyboard comes focus.

below activity theme , code in activity hide bar , make full screen :

 decorview = getwindow().getdecorview();     uioptions = view.system_ui_flag_hide_navigation | view.system_ui_flag_immersive_sticky             | view.system_ui_flag_layout_fullscreen | view.system_ui_flag_immersive_sticky; 

theme :

 <style name="apptheme_darkstatus" parent="theme.appcompat.light.noactionbar">     <item name="colorprimary">@color/colorprimary</item>     <item name="colorprimarydark">@color/colorprimaryverydark</item>     <item name="coloraccent">@color/coloraccent</item>     <item name="windowactionbar">false</item>     <item name="windownotitle">true</item>     <item name="android:windowcontenttransitions">true</item>     <item name="android:windowdrawssystembarbackgrounds">true</item> 

xml :

 <relativelayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_below="@+id/include_view"     android:isscrollcontainer="true"     android:background="@android:color/white">      <com.handmark.pulltorefresh.library.pulltorefreshlistview         xmlns:ptr="http://schemas.android.com/apk/res-auto"         android:id="@+id/lv_chat"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_above="@+id/rl_send"         android:divider="@null"         android:fadescrollbars="false"         android:fadingedge="none"         android:overscrollmode="never"         android:scrollbars="none"         ptr:ptrheadersubtextcolor="@color/c_input_text_color"         ptr:ptrheadertextcolor="@color/c_input_text_color"         ptr:ptroverscroll="false"         ptr:ptrpulllabel="pull refresh"         ptr:ptrrefreshlabel="loading..."         ptr:ptrreleaselabel="release refresh"         ptr:ptrrotatedrawablewhilepulling="true"         ptr:ptrshowindicator="false" >     </com.handmark.pulltorefresh.library.pulltorefreshlistview>      <relativelayout         android:id="@+id/rl_send"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:background="@color/c_white"         android:gravity="center" >          <view             android:id="@+id/view_dummy"             android:layout_width="match_parent"             android:layout_height="@dimen/d_diff_p5dp"             android:background="@color/c_text_light_color" />          <relativelayout             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_below="@+id/view_dummy"             android:layout_toleftof="@+id/btn_send"             android:layout_marginright="@dimen/d_diff_5dp"             android:layout_marginleft="@dimen/d_diff_10dp"             android:layout_margintop="@dimen/s_diff_7sp"             android:layout_marginbottom="@dimen/s_diff_7sp"             android:background="@drawable/opawhite_rectcorner_all" android:id="@+id/relativelayout">              <edittext                 android:id="@+id/et_message"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_margin="@dimen/d_diff_1dp"                 android:background="@null"                 android:focusableintouchmode="true"                 android:maxheight="100dp"                 android:hint="type here..."                 android:maxlength="150"                 android:textsize="@dimen/s_diff_16sp"                 android:padding="@dimen/s_diff_6sp"                 android:textcolorhint="@color/c_input_text_color"                 android:textcolor="@color/c_black" />         </relativelayout>          <textview             android:id="@+id/btn_send"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:background="@color/c_white"             android:text="send"             android:padding="@dimen/d_diff_5dp"             android:layout_marginright="@dimen/d_diff_5dp"             android:gravity="center"             android:textcolor="@color/c_orange_main"             android:textsize="@dimen/s_diff_16sp"             android:layout_centervertical="true"             android:layout_alignparentright="true"             android:layout_alignparentend="true"/>     </relativelayout> </relativelayout> 

i want show edittext , send button above keyboard overlaps edittext.

thanks!

the property android:windowsoftinputmode="adjustresize" doesn't work full screen activity, have remove activity full screen flags in order advantage of adjust resize. see this: a fullscreen window ignore value of soft_input_adjust_resize window's softinputmode field; window stay fullscreen , not resize.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

python 3.5 - Pyqtgraph string in x tick -