sendUserActionEvent () возвращается - PullRequest
0 голосов
/ 29 августа 2018

Я получил следующую ошибку, когда всплывающее окно закрывается с помощью Android Studio. код работает нормально, но в logcat появляется следующая ошибка:

E / ViewRootImpl: возвращено sendUserActionEvent ().

Java-код:

LayoutInflater layoutInflater= getLayoutInflater();
    View popupView = layoutInflater.from(getActivity()).inflate(R.layout.dayview_popup,null);
    popupWindow = new PopupWindow(popupView, Toolbar.LayoutParams.MATCH_PARENT, Toolbar.LayoutParams.WRAP_CONTENT,true);
    popupWindow.setOutsideTouchable(true);
....
int[] loc_int = new int[2];
    try
    {
        view.getLocationOnScreen(loc_int);
    } catch (NullPointerException npe)
    {


    }
Rect location = new Rect();
    location.left = loc_int[0];
    location.top = loc_int[1];
    location.right = location.left + view.getWidth();
    location.bottom = location.top + view.getHeight();
    popupWindow.setAnimationStyle(R.style.Animation);
    popupWindow.showAtLocation(view, Gravity.TOP|Gravity.RIGHT, location.right, location.bottom);
    View container = (View) popupWindow.getContentView().getParent();
    WindowManager wm = (WindowManager) cntx.getSystemService(Context.WINDOW_SERVICE);
    WindowManager.LayoutParams p = (WindowManager.LayoutParams) container.getLayoutParams();
    p.flags |= WindowManager.LayoutParams.FLAG_DIM_BEHIND;
    p.dimAmount = 0.7f;
    wm.updateViewLayout(container, p);
...