2

I am using Android studio 130.677228. Everything is OK and installed and my project has been built successfully. But I do not have Preview tab for layouts and there is no “Preview” menu in “Tool Windows”

Why? How can I solve this?

enter image description here

I have read:

Where is Android Studio layout preview?

Select target API in the Android Studio layout design preview

How do I show the rich layout editor in Android Studio?

But my answer is not there.

Community
  • 1
  • 1
Bob
  • 22,810
  • 38
  • 143
  • 225

3 Answers3

11

From what I can see you are editing a Menu resource file, not a Layout resource file. The Layout preview is only available when editing a Layout resource.

Once you are editing an actual resource file, which should be stored in it '/layout/' folder, you will see the editor preview on the far right side, below Maven Projects.

enter image description here

daniel_c05
  • 11,438
  • 17
  • 60
  • 78
  • OK! The Layout preview is only available when editing a Layout resource. Thanks! – Bob Jun 02 '13 at 07:36
1

To see the menu preview you have to lower the API level to 16 or lower and it will show you on the device in top right corner. On higher API levels only a blank white screen is shown.

Joolui
  • 21
  • 3
0

At least in Android studio 1.2.2 (Possibly others?) your menu can be shown even if its not a layout. You just have to choose AppTheme via appropriate button on preview screen of Android studio.

Chose for example Holo.CompactMenu with lets say nexus 5 set as device. It will roughly show you the menu elements.

DanteTheSmith
  • 2,937
  • 1
  • 16
  • 31