Focus on EditText in a Popup Window goes the activity to sleep

∥☆過路亽.° 提交于 2019-12-05 18:08:52

Some code from my project may help

        LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        PopupWindow  share_popup = new PopupWindow(inflater.inflate(R.layout.share_dropdown, null, false), 162, LinearLayout.LayoutParams.WRAP_CONTENT, true);
        share_popup.setOutsideTouchable(true);
        share_popup.setTouchable(true);
        share_popup.setFocusable(true);
        Drawable image_saved = getResources().getDrawable(R.drawable.dummy_bg);
        share_popup.setBackgroundDrawable(image_saved);

where this R.drawable.dummy_bg is a transparent image.

I just set setBackgroundDrawable of PopupWindow. Everything seems be OK! I'm in consternation!!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!