I am trying to hide my FloatingActionButton fabLocation programmatically with :
fabLocation
fabLocation.setVisibility(View.GONE)
but it do
I know that you answer is about how to make it work for gone visibility but if you use invisible instead you will have no worries about that and is less code.
gone
invisible