Skip to content

Commit

Permalink
优化一下
Browse files Browse the repository at this point in the history
  • Loading branch information
chenli committed Dec 13, 2021
1 parent 977c84d commit f603034
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
//去除Dialog默认头部
Dialog dialog = getDialog();
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
// dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setCanceledOnTouchOutside(isCancelableOutside());
if (dialog.getWindow() != null && getDialogAnimationRes() > 0) {
dialog.getWindow().setWindowAnimations(getDialogAnimationRes());
}
if (getOnKeyListener() !=null){
dialog.setOnKeyListener(getOnKeyListener());
}
super.onViewCreated(view, savedInstanceState);
}

protected DialogInterface.OnKeyListener getOnKeyListener() {
Expand Down

0 comments on commit f603034

Please sign in to comment.