我正在使用应用程序实现应用程序,BottomSheetFragment但无法理解在哪里可以访问View片段的测量根。问题是onViewCreated()没有调用。在, , 中getView(),返回null。我的方法代码:onAttach()onActivityCreated()onStart()onResume()setupDialog
@Override
public void setupDialog(Dialog dialog, int style) {
super.setupDialog(dialog, style);
View contentView = View.inflate(getContext(), getContentResource(), null);
dialog.setContentView(contentView);
}