example/src/main/java/de/mrapp/android/view/example/MainActivity.java
private OnClickListener createFloatingActionButtonListener() {
        return new OnClickListener() {

            @Override
            public void onClick(final View v) {
                Toast toast =
                        Toast.makeText(MainActivity.this, R.string.floating_action_button_toast,
                                Toast.LENGTH_SHORT);
                toast.show();
            }

        };
    }
private OnClickListener createFloatingActionButtonListener() {
        return new OnClickListener() {

            @Override
            public void onClick(final View v) {
                Toast toast =
                        Toast.makeText(MainActivity.this, R.string.floating_action_button_toast,
                                Toast.LENGTH_SHORT);
                toast.show();
            }

        };
    }
private OnClickListener createFloatingActionButtonListener ( ) { return new OnClickListener ( ) { @ Override public void onClick ( final View v ) { Toast toast = Toast . makeText ( MainActivity . this , R . string . floating_action_button_toast , Toast . LENGTH_SHORT ) ; toast . show ( ) ; } } ; }
Creates and returns a listener, which allows to show a toast when a floating action button
has been clicked.

@return The listener, which has been created, as an instance of the type {@link
OnClickListener}
Creates and returns a listener which allows to show a toast when a floating action button has been clicked .