java类com.afollestad.materialdialogs.internal.MDRootLayout的实例源码

MaterialDialog.java 文件源码 项目:EasyFrame 阅读 26 收藏 0 点赞 0 评论 0
@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);
    }
}
MaterialDialog.java 文件源码 项目:GitHub 阅读 28 收藏 0 点赞 0 评论 0
@SuppressLint("InflateParams")
protected MaterialDialog(Builder builder) {
    super(builder.context, DialogInit.getTheme(builder));
    handler = new Handler();
    this.builder = builder;
    final LayoutInflater inflater = LayoutInflater.from(builder.context);
    view = (MDRootLayout) inflater.inflate(DialogInit.getInflateLayout(builder), null);
    DialogInit.init(this);
}
MaterialDialog.java 文件源码 项目:material-dialogs 阅读 25 收藏 0 点赞 0 评论 0
@SuppressLint("InflateParams")
protected MaterialDialog(Builder builder) {
  super(builder.context, DialogInit.getTheme(builder));
  handler = new Handler();
  this.builder = builder;
  final LayoutInflater inflater = LayoutInflater.from(getContext());
  view = (MDRootLayout) inflater.inflate(DialogInit.getInflateLayout(builder), null);
  DialogInit.init(this);

  // Don't keep a Context reference in the Builder after this point
  builder.context = null;
}


问题


面经


文章

微信
公众号

扫码关注公众号