I cannot remove the default pink FloatingActionButton in navigation box activity

So, I can’t understand for life why I can’t remove the default FAB, which comes with the activity of the navigation box. I did this , I tried to click a button in the Design view for activity_main.xml and content_main.xml , but I cannot select it, so I cannot delete it.
Does anyone know how this button is somehow baked into NavDrawer activity, or is there something I miss here?

I am using AS 1.5.1.

+5
source share
4 answers

This is in app_bar_main.xml in the layout folder.

+10
source

You can remove the same from an XML file that has a floating action bar. If you are not sure, go to the main activity class where your navigation box is declared. Ctrl + mouse is the primary button on the id of the floating action panel (using the android studio), this will lead directly to you the XML file where it is defined. Comment on this part. Return to the activity class and comment code associated with the floating action bar. Done. You are all set to further customize.

0
source

Switch to text in your XML and dry the FloatingActionButton removal. Also look for the FloatingActionButton in the Java activity file and delete it from there. It is in the onCreate() method.

0
source

for not returning. When you decide to create a new action, always select Empty Activity, not Basic Activity.

0
source

Source: https://habr.com/ru/post/1241837/


All Articles