0

windowSoftInputMode=“adjustResize” not working with translucent action/navbar So I have created custom layout

public class CustomRelativeLayout:RelativeLayout
{
    private int[] mInsets = new int[4];

    public CustomRelativeLayout(Context context) : base(context)
    {
    }

    public CustomRelativeLayout(Context context, IAttributeSet attrs) : base(context, attrs)
    {
    }

    public CustomRelativeLayout(Context context, IAttributeSet attrs, int defStyleAttr) : base(context, attrs, defStyleAttr)
    {
    }


    public override WindowInsets OnApplyWindowInsets(WindowInsets insets)
    {
        if (Build.VERSION.SdkInt >= Build.VERSION_CODES.KitkatWatch)
        {
            //insets.ReplaceSystemWindowInsets(0, 0, 0, insets.SystemWindowInsetBottom);
            return base.OnApplyWindowInsets(insets.ReplaceSystemWindowInsets(0,0,0, insets.SystemWindowInsetBottom));
        }
        else
        {
            return insets;
        }
    }


}

but it takes time to show and hide keyboard and even it takes time to push layout up. How to resolve it ???

Vanjara Sweta
  • 81
  • 1
  • 10

1 Answers1

0

Add the following property

android:fitsSystemWindows="true"

in the root RelativeLayout of the fragment .xml layout.

Here is a similar issue which you can refer .

Lucas Zhang
  • 18,630
  • 3
  • 12
  • 22
  • Check https://stackoverflow.com/questions/8398102/androidwindowsoftinputmode-adjustresize-doesnt-make-any-difference – Lucas Zhang Jul 30 '19 at 09:17