Code example for DialogFragment

Methods: showsetArguments

0
	@Override 
	public void onListItemClick(ListView l, View v, int position, long id) {
		DialogFragment newFragment = new OptionsDialog();
		Bundle args = new Bundle();
		args.putInt("position", position);
		newFragment.setArguments(args);
	    newFragment.show(getFragmentManager(), "optionsDialog");
	} 
 
	@Override 
	public void onDestroy() { 
		super.onDestroy(); 
	} 
	 
} 
Contextual code suggestions in your IDE  Get Codota for Java