private OnClickListener createNegativeButtonListener ( ) { return new OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { Toast . makeText ( getActivity ( ) , R . string . negative_button_toast , Toast . LENGTH_SHORT ) . show ( ) ; } } ; }
Creates and returns a listener which allows to show a toast when the negative button of a dialog has been clicked .