码迷,mamicode.com
首页 > 移动开发 > 详细

Android 底部Dialog显示

时间:2016-05-09 18:46:21      阅读:349      评论:0      收藏:0      [点我收藏+]

标签:

  public void showComplainDialog() {
        ComplainDialog complain_dialog = new ComplainDialog(OrderDetialActivity.this,
                R.style.customdialog_complain_style,
                R.layout.complain_dialog);
        Window win = complain_dialog.getWindow();
        win.getDecorView().setPadding(0, 0, 0, 0);
        WindowManager.LayoutParams lp = win.getAttributes();
        lp.width = WindowManager.LayoutParams.FILL_PARENT;
        lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
        win.setAttributes(lp);
        complain_dialog.show();
        complain_dialog
                .setYourListener(new ComplainDialog.ComplainButtonListener() {
                    @Override
                    public void setComplainString(String complainString) {
                        if (IsChinese.iszhongwen(complainString)) {
                            showTipsDialog("投诉输入含有非法字符");
                            return;
                        }
                        if (IsChinese.containsEmoji(complainString)) {
                            showTipsDialog("不支持输入表情符号");
                            return;
                        }
                        if (!TextUtils.isEmpty(complainString)) {
                            setComplainInfo(complainString.replace(" ", "").replace("\n", ""));
                        }
                    }
                });
    }

  

Android 底部Dialog显示

标签:

原文地址:http://www.cnblogs.com/spring87/p/5474914.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!