Fix the display of the toolbar in Android Studio

From time to time I get this really nasty bug where the toolbar in Android Studio is aligned to the start of the screen.

I mean the part where you select the device and press Run, for some reason sometimes just moves to the left and bringing it back to the right is a bit of a pain. Also if you hide the main navigation toolbar by accident, then it is really hard to bring it back. Here is the solution:

  1. Close Android Studio.
  2. Go to Home/.config/Google/AndroidStudio2020.3/options
  3. Delete ui.Inf.xml

After that just start Android Studio as normal and all of the toolbars will be placed as they were by default.