android - Softkeyboard overlaps EditText -
my root layout is:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <include layout="@layout/toolbar" /> <framelayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent"/> </linearlayout>
content framelayout being replaced layout:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:ignore="unusedattribute"> <framelayout android:id="@+id/messages" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_above="@+id/messagelayout"> <android.support.v7.widget.appcompattextview android:id="@+id/emptyview" android:text="@string/no_messages" android:textsize="18sp" android:textcolor="?attr/colorprimary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:layout_gravity="center" android:visibility="gone" tools:visibility="visible"/> <af.kabuljan.android.ui.widget.emptyrecyclerview android:id="@+id/recyclerview" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingtop="4dp" android:background="@color/md_indigo_100"/> <progressbar android:id="@+id/progressview" android:layout_width="40dp" android:layout_height="40dp" android:layout_gravity="center" android:visibility="gone" tools:visibility="visible"/> </framelayout> <relativelayout android:id="@+id/messagelayout" android:layout_width="match_parent" android:layout_height="48dp" android:layout_alignparentbottom="true" android:elevation="8dp"> <imageview android:id="@+id/btnattach" android:layout_width="48dp" android:layout_height="48dp" android:src="@drawable/ic_attachment" android:tint="@color/primary_dark" android:padding="4dp" android:layout_alignparentleft="true"/> <android.support.v7.widget.appcompatedittext android:id="@+id/message" android:hint="@string/entermessage" android:textsize="18sp" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_torightof="@+id/btnattach" android:layout_toleftof="@+id/btnsend" android:background="#00000000" android:inputtype="textshortmessage|textautocorrect|textcapsentences|textmultiline" android:imeoptions="actionsend|flagnoenteraction" android:padding="4dp" android:gravity="center_vertical"/> <android.support.v7.widget.appcompatbutton android:id="@+id/btnsend" android:text="@string/send" android:textcolor="@android:color/white" android:background="@drawable/send_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentright="true" android:layout_centervertical="true" android:layout_margin="4dp" app:elevation="4dp"/> </relativelayout> </relativelayout>
let's assume messaging app , window has recyclerview bubble messages can scrolled, bottom input should @ bottom. problem when tap edittext - softkeyboard overlaps edittext. should make whole container (toolbar+recyclerview+bottom input) resized lay out softkeyboard bottom?
tried adjustresize
- no result. i've attached 2 screenshots. 1st - wrong, 2nd - correct.
yeah on right track adjustresize
, that's should specify desired activity layout behaviour wwith soft keyboard.
what setting did try, , did have affect?
the docs here: https://developer.android.com/guide/topics/manifest/activity-element.html#wsoft
Comments
Post a Comment