android - Coordinatorlayout adjustresize not working -
my code (and more): have coordinator layout follows
<android.support.design.widget.coordinatorlayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true"> <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:fitssystemwindows="true"> <android.support.design.widget.collapsingtoolbarlayout android:id="@+id/collapse_toolbar" android:layout_width="match_parent" android:layout_height="280dp" android:fitssystemwindows="true" app:contentscrim="@color/transparent" app:layout_scrollflags="scroll|exituntilcollapsed"> <include layout="@layout/top" /> <!-- relativelayout --> <android.support.v7.widget.toolbar android:id="@+id/mytoolbar" android:layout_width="match_parent" android:layout_height="64dp" app:layout_collapsemode="parallax"> </android.support.v7.widget.toolbar> </android.support.design.widget.collapsingtoolbarlayout> </android.support.design.widget.appbarlayout> <framelayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <!-- main content here --> </framelayout> </android.support.design.widget.coordinatorlayout>
inside frame layout inflating custom view edit text placed @ bottom. edit text , custom view show fine.
i have defined android:windowsoftinputmode="adjustresize|statehidden" in manifest.
my problem: while tapping on edit text bring softkeyboard, overlaps content beneath instead of resizing framelayout. not framelayout resize when soft keyboard comes up. appreciated
things tried:
- updated design support library 22.2.1
- added android:layout_gravity="fill_vertical" attribute in framelayout.
my layout
<android.support.design.widget.coordinatorlayout> <android.support.design.widget.appbarlayout> <android.support.design.widget.collapsingtoolbarlayout> <imageview> <android.support.v7.widget.toolbar> <android.support.design.widget.collapsingtoolbarlayout> <android.support.design.widget.appbarlayout> <android.support.v4.widget.nestedscrollview> <android.support.design.widget.floatingactionbutton> <android.support.design.widget.coordinatorlayout>
i had exact same problem. figured out, if use within e.g. nestedscrollview
or within framelayout
assume handles scroll itself, coordinatorlayout
not adjustresize
/ behave way want. adjustresize|adjustpan settings within manifest ignored.
for me hard figure out, because wrote few (combined-) views myself contained relativelayout
or scrollviews
, such.
if avoid using relativelayouts
or else nestedscrollview
handle view scrolling, behaves way, @ least wanted to.
but think, there bug within coordinatorlayout
or behaviour need understand better avoid type of problems...
maybe useful know someone...
my settings are:
- support/design/appcompat : 22.2.1
- no need layout_gravity
Comments
Post a Comment