how to use getLayoutInflater in fragment layout?
<p>I need to use getLayoutInflater in fragment class but is has an error like below:</p>

<pre><code>Error:(290, 17) error: method getLayoutInflater in class Fragment cannot be applied to given types;
required: Bundle
found: no arguments
reason: actual and formal argument lists differ in length
</code></pre>

<p>It is my code :</p>

<pre><code>private void initDialog(){
    alertDialog = new AlertDialog.Builder(getContext());
    view = getLayoutInflater().inflate(R.layout.dialog_layout,null);
    alertDialog.setView(view);
    alertDialog.setPositiveButton("Save", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            if(add){
                add =false;
                mainListAdapter.addItem(et_country.getText().toString());
                dialog.dismiss();
            } else {
                mainListAdapter.mList.set(edit_position,et_country.getText().toString());
                mainListAdapter.notifyDataSetChanged();
                dialog.dismiss();
            }

        }
    });
    et_country = (EditText)view.findViewById(R.id.et_country);
}
</code></pre>