I can\'t hide my FloatingActionButton. Here is my code:
XML:
For FloatingActionButton the setVisibility() method will give you an error while building with the latest Gradle 6.x and build-tool 28.x.x and is not encouraged any more. Instead, use:
fab.hide() // fab.setVisibility(View.GONE)
fab.show() // fab.setVisibility(View.VISIBLE)
Note: Succesfully tested on
Android Studio 3.4.1,Gradle 6.0andbuild-tool 28.0.1