New in IntelliJ IDEA 11: Preview of Android UI layouts

IntelliJ IDEA 11 introduces a new feature that makes it much easier to design UI layouts for Android applications — UI layouts preview. Just open some layout xml file from your Android project and you’ll see a new Preview tool window. 

Preview is updated as you edit the file, so you can see the changes immediately. Many different options such as screen size, target platform version, theme, etc. are available for tuning what you see.

Custom view components are also supported and shown correctly. But since IntelliJ IDEA uses class files from your output directory to render such components, you have to build your project first.

Please note, that layout preview feature is under development, so we really need to know your opinions. You’re welcome to try it in the latest Nika EAP and let us know what you think. If the IDE doesn’t preview some of your layout xml files, please submit bugreports with these files attached.

Comments below can no longer be edited.

30 Responses to New in IntelliJ IDEA 11: Preview of Android UI layouts

  1. Avatar

    Dirk Jäckel says:

    October 13, 2011

    This is the best new feature in Nika!

    It is such a big time saver.

    Thanks a lot!

  2. Avatar

    stepand76 says:

    October 13, 2011

    Great! I’m looking forward

  3. Avatar

    devdanke says:

    October 13, 2011

    Thank you for adding this feature.
    I should speed up Android development.

  4. Avatar

    Artem says:

    October 13, 2011

    This is very usefull thing, I will wait for a new version.

  5. Avatar

    jwb says:

    October 13, 2011

    Looks like I’m going to have to upgrade now. Keep up the great work with killer new features.

  6. Avatar

    Marc Poppleton says:

    October 14, 2011

    I definitely no longer have any good reason to keep using Eclipse alongside IntelliJ.

  7. Avatar

    Slava says:

    October 19, 2011

    Does it support custom views? I have a class Field inherited from View and I see “Unable to initialize …Field” to the top of the Preview.

  8. Avatar

    Rusli says:

    October 19, 2011

    Looks really useful and nice guys!
    I would really enjoy using this stuff @ development!

  9. Avatar

    Marek says:

    October 20, 2011

    definitely android killer feature! 🙂 thanks a lot, keep workin, can’t wait for Nika 😉

  10. Avatar

    Shkrum says:

    October 20, 2011

    I’m waiting for this awesome plugin!
    It will do my life much better 🙂

  11. Avatar

    Roman Nurik says:

    October 20, 2011

    You guys are SO awesome 🙂

  12. Avatar

    Rob says:

    October 21, 2011

    Its seems to be very interesting but its just a preview of UI. If it will editable I’ll absolutely happy. But progress is good…

  13. Avatar

    golubev says:

    October 21, 2011

    I wait for it and now it happened;) Thanks jetbrains!

  14. Avatar

    Sven says:

    October 21, 2011

    These are great news for Android developers using IDEA! I hope the next step will be a full fledged Android UI designer 🙂

    Keep up the good work!

  15. Avatar

    Labeeb says:

    October 22, 2011

    Great… I’m waiting for this

  16. Avatar

    Ondrej says:

    October 22, 2011

    Wonderful feature! I hate development in Eclipse, random build errors poped up on me in the last 3 days in that IDE (the same code builds correctly in IntelliJ) so I tried IntelliJ for the first time today and I fell in love on the first touch. Would be great if the Preview feature distinguished between layouts in layout and layout-land folders and automatically selected Landscape/Portrait parameter in the Preview window based on that… Keep up the great work!

  17. Avatar

    Tomáš says:

    October 30, 2011

    Awesome. Keep improving Android support.

  18. Avatar

    yinchong says:

    November 4, 2011

    How do i set up the idea IDE for Android platform development.
    Like this:http://source.android.com/source/using-eclipse.html.
    Think you.

  19. Avatar

    slarti says:

    November 9, 2011

    I love you guys for this!! Thank you!! 😀

  20. Avatar

    Chris says:

    December 7, 2011

    Is it only me, or does it omit background images on buttons (used as drawable reference). But still, nice feature.

    Btw, its a library project (where I define the layout and also the buttons), maybe this is the reason? Dont want to file a “bug report” before I know its a bug, and not a glitch due to my setup.

  21. Avatar

    Milo says:

    January 15, 2012

    Will a GUI layout designer be implemented (just like in Eclipse)?

  22. Avatar

    Mahen says:

    February 5, 2012


    I like this, but it would be much better if it were a design editor, allowing direct editing of the design (like ecclipse).

    That would make designing a UI in IntelliJ much faster.

  23. Avatar

    gest22 says:

    February 20, 2012

    IDEA RULES! After adding this feature I really do not have to even open any other IDE for Android.

    If you’re making a list for new version of the preview, then please implement **scrolling**

    Namely, if a view gets out (by its width) of preview screen, than it is not displayed. Only first X items will be displayed.

    It would be nice if scrolling is enabled.

  24. Avatar

    Ed Jones says:

    February 23, 2012

    This is a really good feature and makes form layouts a lot easier! However, the changes that are reflected in this preview don’t carry across to my app? Any changes in the .java are but nothing that I change in my .xml files?

  25. Avatar

    Musawer says:

    August 2, 2012

    guys it is good but still components drag and drop missing hope that will be added too in coming versions.

  26. Avatar

    Asteckley says:

    September 20, 2012

    Can anyone tell me:
    1) Where are the device configurations for the Android UI previewer stored with IDEA? I can only find the current window options (which device configuration is active) within the *.iws file.. but would like to find the actual device configurations. One can add custom device configurations, so they must be stored somewhere, but I cannot find them in the *.ipr file or in the IDEA application area.

    2) Is there anywhere I can get a pre-setup list of device configurations for many common android phones and tablets that are currently on the market, so we can use this during development?


  27. Avatar

    Eugene Kudelevsky says:

    September 28, 2012

    @Asteckley, we’re consistent with ADT here
    1. Custom configurations are stored in Home_Directory/.android/devices.xml
    2. Default configurations are stored in Sdk_Directory/tools/lib/devices.xml

  28. Avatar

    Whizkid says:

    November 3, 2012

    creating android xml layouts in intelliJ is so slow, please optimize

  29. Avatar

    Behzad says:

    February 12, 2013


Discover more