Besides all the sophisticated features like code completion, code analysis, and Android specific code re-factoring, the new IDE includes a built-in layout previewer. This will be a big bonus for app developers for a couple of very important reasons. First getting an app’s user interface right can be hard. Although actually adding the different components to a UI is relatively simple, actually making that design easy to use and intuitive can be difficult. By adding new design tools including the preview mode Google is trying to make that job easier. Often the difference between a good app and a bad app can just be the design of the UI, regardless of the level or completeness of the functionality. The new preview window is live in the sense that it reflects changes to the XML in the layout file as the developer types. As soon as a new component is added it will appear in the preview without the need to manually re-render it.
The second reason the new design preview is important is that it allows developers simultaneously to see how the app looks across a range of devices. The new “preview all” function will populate the preview pane with all of the currently defined virtual devices. This means that the current UI can be previewed across phones and tablets (in a landscape or portrait) simultaneously. This is a huge benefit for developers as getting an app to look good on a a 3.5 inch phone, a 5 inch HD phone and a tablet can be a significant challenge. The IDE also understands custom layouts meaning that if the app uses a different layout for tablets then the preview will show the right layout on the right device.
This preview mode also extends to translations. The IDE includes built-in functionality to create multi-language apps. The IDE is language sensitive and when editing the code it can look up the hard coded strings and show the actual string in the editor rather than the function calls which gets the right string for the current language. Likewise the preview can be set to display all the languages simultaneously meaning that verifying the design across the different languages becomes a lot easier. For example if the font size of a label is increased it might look fine in English, but in Spanish the label may become cropped. This can be easily spotted in the preview mode.
The new IDE is available for Windows, OS X and Linux. To run Android Studio and to create Android apps you need to install the Java Development Kit which can be downloaded from Oracle’s web site. Google is still working on the IDE and at the moment it is considered to be only a preview version, however it is worth downloading and taking a look at where Google is heading with its Android app design tools.