How to remove automatic items from an activity

0

In Android Studio, at the time of creating an activity, the IDE already places some items inside it, like that circle with an envelope inside (image). How do I pull this off after creating the activity?

    
asked by anonymous 28.03.2016 / 17:34

1 answer

0

When you create a new activity, Android Studio tries to make your work easier by leaving several things created. Like the Toolbar and FloatingButton case. If you do not want an activity with FloatingButton select BlankActivity. BlankActivity comes empty with only the minimum required to use that activity, ie the BlankActivity IDE adds it in Manifest as activity, creates Java inheriting from AppCompact with onCreate () method, creates 2 layout XML being an activity_layout. xml and content_layout.xml.

The 2 XML are created to facilitate the organization of the code. The content as the name already says will have the main content of the activity, lists, buttons, etc. and in the activity layout is inserted "default" objects, that every page has, such as FloatingButton, Toolbar, and content_layout.

If you want to create an activity without FloatingButton select BlankActivity, if you select Empity then aIDE understands that you will need the FloatingButton and add it in XML and already create the Java code to manipulate it.

The same idea is for the other Activity, for example if you want to work with Maps select the template with map, because the IDE will prepare everything you need to manipulate the map.

    
31.03.2016 / 15:38