设置dialogfragment不可取消

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.chs_about_dialog, container, false);
initView(view);
//设置DialogFragment 不可取消
getDialog().requestWindowFeature(STYLE_NO_TITLE);
setCancelable(false);
return view;
}

你可能感兴趣的:(设置dialogfragment不可取消)