Popupwindow update issue in API 26(Samsung S8)

I am facing popup window update issue in Samsung S8 device. In my sample editText is placed the bottom of the screen and popup window appear at above that editText, when it text is changed. But popup window does not appear in correct position when editText is in focused state(Samsung S8 API 26 only). For all other devices it work as expected.

Replication steps:

1)Focus EditText (only S8 API 26)

2)change Text

3)Popup not appear above editText

Code

EditText editText; 
        PopupWindow popupWindow;
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            LinearLayout linearLayout = new LinearLayout(this){Orientation=Orientation.Vertical};

            editText = new EditText(this) { Text = "TestEditText" };
            editText.TextChanged+= EditText_TextChanged;
            RelativeLayout relativeLayout = new RelativeLayout(this);
            relativeLayout.LayoutParameters = new Android.Views.ViewGroup.LayoutParams(Android.Views.ViewGroup.LayoutParams.WrapContent, Android.Views.ViewGroup.LayoutParams.WrapContent);
            relativeLayout.AddView(editText);
            RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(1000, 150);
            layoutParams.SetMargins(0, 1400, 0, 0);
            editText.LayoutParameters = layoutParams;
            linearLayout.AddView(relativeLayout);

            popupWindow = new PopupWindow(this);
            LinearLayout linearLayoutnew = new LinearLayout(this);
            linearLayoutnew.AddView(new TextView(this) { Text = "Testing Popup window behavioor with S8 devices" });
            linearLayoutnew.AddView(new Button(this) { Text = "TestButton" });
            linearLayoutnew.LayoutParameters = new Android.Views.ViewGroup.LayoutParams(300, 200);
            popupWindow.Height = 200;
            popupWindow.ContentView = linearLayoutnew;
            SetContentView(linearLayout);
        }

        void EditText_TextChanged(object sender, Android.Text.TextChangedEventArgs e)
        {
            popupWindow.ShowAsDropDown(editText, 0, -(editText.Height + popupWindow.Height));
        }

Is there any workaround to solve this issue.