Java 类com.afollestad.materialdialogs.internal.MDRootLayout 实例源码

项目:EasyFrame    文件:MaterialDialog.java   
@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);
    }
}
项目:GitHub    文件:MaterialDialog.java   
@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);
}
项目:material-dialogs    文件:MaterialDialog.java   
@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;
}