Search code examples
android-layouttoolbar

Missing toolbar in Android Studio?


So I was making some layouts and one day noticed my toolbar was missing for some of my newer files. These are xml files that are shown in design view.

The image with the blue arrow shows the toolbar I am refering to, that is present in one of my files. The image with the yellow question mark shows the toolbar that is missing in another file.

I have looked around but can't find how to restore it, not even sure how I accidentally removed it in the first place. Any suggestions on how to bring it back?

Arrow is pointing to toolbar

Question mark is pointing to missing toolbar

UPDATE: Problem has been fixed and here is what it looks like to "convert the view" and get the toolbar back.

Toolbar is back


Solution

  • The toolbar that is missing is associated with a constraint based layout, and it missing because the layout for your new view does not have a constraint based layout.

    You can right click the view and click Convert to ConstraintBasedLayout in the dropdown menu to restore that bar.