android - Using adjustResize with fragments and requestFocus -


i'm trying create activity single relativelayout used fragment container, each fragment has separate background color bleeds under translucent status bar, , activity whole accounts keyboard size.

the layout activity is:

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/fragment_container"         android:layout_width="match_parent"         android:layout_height="match_parent" /> 

the fragments wrapped with:

<android.support.constraint.constraintlayout xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:app="http://schemas.android.com/apk/res-auto"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:animatelayoutchanges="true" /> 

and activity defined as:

<activity android:screenorientation="portrait"           android:name=".login.loginactivity"           android:windowsoftinputmode="adjustresize" /> 

everything working fine first fragment. activity resizes relativelayout, fragment contained within resizes adjust keyboard, , fine. however, when replacing 1 fragment uses <requestfocus /> on <edittext />, keyboard stays second fragment pushed on takes full screen size (under keyboard). closing , re-opening keyboard causes activity re-measure , fine. similarly, if keyboard changes height during fragment transition (when moving field doesn't support autocorrection 1 does, keyboard gets taller), fragment measures correctly. appears problem when transitioning between 2 fragments keyboard size constant.

adding fitssytemwindows=true wrapping relativelayout fixes problem, prevents fragment's view appearing under status bar, isn't want. there way force fragment re-measure or i'm missing? using native fragments, not app-compat.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -