相关疑难解决方法(0)

sendUserActionEvent()返回

当弹出窗口使用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 …
Run Code Online (Sandbox Code Playgroud)

java android popupwindow dismiss

20
推荐指数
1
解决办法
2087
查看次数

三星 Tab3 上的 sendUserActionEvent() mView==null

我正在尝试使用相机从我的应用程序内部捕获图像后预览图像,我确定路径不为空,但我在这行代码中收到此错误Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(),options);并且没有图像视图。注意:我在另一台设备(不是三星)上测试了代码并且它有效。

android bitmap samsung-mobile

5
推荐指数
2
解决办法
3万
查看次数

标签 统计

android ×2

bitmap ×1

dismiss ×1

java ×1

popupwindow ×1

samsung-mobile ×1