To show the fab button write this code on specific click listener

_fab.setVisibility(View.VISIBLE);

To hide the fab button write this code on specific click listener

_fab.setVisibility(View.GONE);