MaterialDialog.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:EasyFrame 作者:
@SuppressLint("InflateParams")
protected MaterialDialog(Builder builder) {
    super(builder.context, DialogInit.getTheme(builder));
    mHandler = new Handler();
    mBuilder = builder;
    final LayoutInflater inflater = LayoutInflater.from(builder.context);
    view = (MDRootLayout) inflater.inflate(DialogInit.getInflateLayout(builder), null);
    DialogInit.init(this);

    // Set up width if on tablet
    if (builder.context.getResources().getBoolean(R.bool.md_is_tablet)) {
        WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
        lp.copyFrom(getWindow().getAttributes());
        lp.width = builder.context.getResources().getDimensionPixelSize(R.dimen.md_default_dialog_width);
        getWindow().setAttributes(lp);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号