com.coder.zzq.smartshow.core.Utils.inflate()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中com.coder.zzq.smartshow.core.Utils.inflate()方法的一些代码示例,展示了Utils.inflate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.inflate()方法的具体详情如下:
包路径:com.coder.zzq.smartshow.core.Utils
类名称:Utils
方法名:inflate

Utils.inflate介绍

暂无

代码示例

代码示例来源:origin: the-pig-of-jungle/SmartShow

public static View inflate(@LayoutRes int layoutRes, ViewGroup viewGroup) {
  return inflate(layoutRes, viewGroup, viewGroup != null);
}

代码示例来源:origin: the-pig-of-jungle/smart-show

public static View inflate(@LayoutRes int layoutRes, ViewGroup viewGroup) {
  return inflate(layoutRes, viewGroup, viewGroup != null);
}

代码示例来源:origin: the-pig-of-jungle/SmartShow

@Override
protected void initView(Dialog dialog, View dialogRootView) {
  super.initView(dialog, dialogRootView);
  Utils.inflate(mLayoutRes, (ViewGroup) dialogRootView, true);
  TextView msgView = dialogRootView.findViewById(R.id.smart_show_loading_message_view);
  if (msgView != null) {
    msgView.setText(mMsg);
  }
}

代码示例来源:origin: the-pig-of-jungle/smart-show

@Override
protected void initView(Dialog dialog, View dialogRootView) {
  super.initView(dialog, dialogRootView);
  Utils.inflate(mLayoutRes, (ViewGroup) dialogRootView, true);
  TextView msgView = dialogRootView.findViewById(R.id.smart_show_loading_message_view);
  if (msgView != null) {
    msgView.setText(mMsg);
  }
}

代码示例来源:origin: the-pig-of-jungle/SmartShow

@Override
protected void initView(Dialog dialog, View dialogRootView) {
  super.initView(dialog, dialogRootView);
  FrameLayout headerViewWrapper = dialogRootView.findViewById(R.id.smart_show_dialog_header_wrapper);
  FrameLayout bodyViewWrapper = dialogRootView.findViewById(R.id.smart_show_dialog_body_wrapper);
  FrameLayout footerViewWrapper = dialogRootView.findViewById(R.id.smart_show_dialog_foot_wrapper);
  Utils.inflate(provideHeaderView(), headerViewWrapper, true);
  Utils.inflate(provideBodyView(), bodyViewWrapper, true);
  Utils.inflate(provideFooterView(), footerViewWrapper, true);
  initHeader(dialog, headerViewWrapper);
  initBody(dialog, bodyViewWrapper);
  initFooter(dialog, footerViewWrapper);
}

代码示例来源:origin: the-pig-of-jungle/smart-show

@Override
protected void initView(Dialog dialog, View dialogRootView) {
  super.initView(dialog, dialogRootView);
  FrameLayout headerViewWrapper = dialogRootView.findViewById(R.id.smart_show_dialog_header_wrapper);
  FrameLayout bodyViewWrapper = dialogRootView.findViewById(R.id.smart_show_dialog_body_wrapper);
  FrameLayout footerViewWrapper = dialogRootView.findViewById(R.id.smart_show_dialog_foot_wrapper);
  Utils.inflate(provideHeaderView(), headerViewWrapper, true);
  Utils.inflate(provideBodyView(), bodyViewWrapper, true);
  Utils.inflate(provideFooterView(), footerViewWrapper, true);
  initHeader(dialog, headerViewWrapper);
  initBody(dialog, bodyViewWrapper);
  initFooter(dialog, footerViewWrapper);
}

代码示例来源:origin: the-pig-of-jungle/SmartShow

@Override
public Dialog createDialog(Activity activity) {
  Dialog dialog = new AppCompatDialog(activity, provideDialogStyle());
  if (mDarkAroundWhenShow) {
    dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
  } else {
    dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
  }
  dialog.getWindow().setBackgroundDrawableResource(mWindowBackground);
  dialog.setCancelable(mCancelable);
  dialog.setCanceledOnTouchOutside(mCancelableOnTouchOutside);
  View dialogRootView = Utils.inflate(provideDialogRootView(), null);
  initView(dialog, dialogRootView);
  ViewGroup.MarginLayoutParams rootLp = new ViewGroup.MarginLayoutParams(provideDialogWidth(), ViewGroup.LayoutParams.WRAP_CONTENT);
  dialog.setContentView(dialogRootView, rootLp);
  return dialog;
}

代码示例来源:origin: the-pig-of-jungle/smart-show

@Override
public Dialog createDialog(Activity activity) {
  Dialog dialog = new AppCompatDialog(activity, provideDialogStyle());
  if (mDarkAroundWhenShow) {
    dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
  } else {
    dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
  }
  dialog.getWindow().setBackgroundDrawableResource(mWindowBackground);
  dialog.setCancelable(mCancelable);
  dialog.setCanceledOnTouchOutside(mCancelableOnTouchOutside);
  View dialogRootView = Utils.inflate(provideDialogRootView(), null);
  initView(dialog, dialogRootView);
  ViewGroup.MarginLayoutParams rootLp = new ViewGroup.MarginLayoutParams(provideDialogWidth(), ViewGroup.LayoutParams.WRAP_CONTENT);
  dialog.setContentView(dialogRootView, rootLp);
  return dialog;
}

相关文章