Unable to find UI designer in the new Android Studio

41,137

Open a xml layout file:

  • at the bottom, you have two tabs: Design/Text enter image description here
  • in design mode, you see the preview directly
  • in text mode, the preview is (by default) on the right, toggled by a 'Preview' button in the rightmost bar

enter image description here

You can also show/hide it with View > Tool Windows > Preview

EDIT

Attention: the IDE only displays the preview if editing a layout file in the res/layout* directory of an Android project. In particular, it won't be displayed if editing a file in build/res/layout* since those are not source directory but output directory.

The Resource folder is set automatically, and can be viewed (and changed) in Project Structure > Modules > [Module name] > Android > Resources directory.

Share:
41,137
Nitesh Verma
Author by

Nitesh Verma

Java Developer

Updated on July 09, 2022

Comments

  • Nitesh Verma
    Nitesh Verma almost 2 years

    I have downloaded the new android studio that has been released recently. I am unable to find the UI design preview for the xml, as it is in eclipse. Any help or suggestions on that?

  • Nitesh Verma
    Nitesh Verma almost 11 years
    there are no tabs at the bottom. I tried the View > Tool Windows , it also doesn't have the Preview option. I there something wrong with my ide?
  • etienne
    etienne almost 11 years
    Probably an issue with the file you are editing; is it an android layout file?
  • Nitesh Verma
    Nitesh Verma almost 11 years
    the file has to be activity_main.xml right?\
  • etienne
    etienne almost 11 years
    The name isn't relevant. But the file should be in a layout*/ folder in the res directory of your project. Check the configuration of the project folders in Project Structure > Facets > Android > Resources Directory
  • etienne
    etienne almost 11 years
    ... of an Android project?
  • Nitesh Verma
    Nitesh Verma almost 11 years
    yes exactly of an android project.
  • Nitesh Verma
    Nitesh Verma almost 11 years
    i suppose i got it. I was in the build/res/all/debug/layout but the design view came when i used the same file name from src/main/res/layout. Thanks for so much help. I got a bit confused on that.
  • Jomia
    Jomia almost 11 years
    i also had the same problem. I can't find the 'Design' tab. Could you please help me to solve this problem?
  • etienne
    etienne almost 11 years
  • Jomia
    Jomia almost 11 years
    @etienne Thanks for the tips.. Now i can see the design tab
  • Nick Westgate
    Nick Westgate over 10 years
    I had this problem from a fresh install and new project created by the wizard. No tabs. Close file, re-open (wasn't in recent files!) from project pane, and now it has Design/Text tabs. Buggier than Eclipse!
  • Darth Continent
    Darth Continent about 10 years
    This worked for me; sure would've been nice if View => Tool Windows => Designer weren't disabled even though clearly the designer was NOT visible. :/