从回收站视图启动弹出窗口

时间:2017-03-30 11:17:36

标签: android

我正在尝试从RecyclerView适配器调用一个弹出窗口,代码编译正常,但我没有在页面上看到任何内容,弹出窗口应该显示一个地方的时间。但是一旦我点击了应该激活它的按钮,没有任何反应,也没有编译错误:

    if (myDropzone.getAcceptedFiles().length > 0) {
        if (submitfiles === true) {
            submitfiles = false;
            return;
        }

        file.preventDefault();
        myDropzone.processQueue();

        myDropzone.on("complete", function () {
            submitfiles = true;
            $('#submit_button').trigger('click');
        });
    } 
});

这是调用DetailsAdapter

中的函数的按钮
    private void initiatePopupWindow(View view) {
        try {
// We need to get the instance of the LayoutInflater
            LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View layout = inflater.inflate(R.layout.times_popup,
                    (ViewGroup) view.findViewById(R.id.popup_element));
            pwindo = new PopupWindow(layout ,ViewGroup.LayoutParams.WRAP_CONTENT,
                    ViewGroup.LayoutParams.WRAP_CONTENT,true);


            btnClosePopup = (Button) layout.findViewById(R.id.btn_close_popup);
            btnClosePopup.setOnClickListener(cancel_button_click_listener);



        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    private View.OnClickListener cancel_button_click_listener = new View.OnClickListener() {
        public void onClick(View v) {
            pwindo.dismiss();


        }
    };

0 个答案:

没有答案