Android Studio has ample tools to help you navigate the user interface and project work space. You can also manage the work space layout from the Window menu by moving items and saving as the default layout. This video explains how to navigate the Android Studio user interface, how to set windows to easily find and navigate later, and how to change the default layout to better suit your needs.
Android Studio offers a rich set of tools that let you navigate around the workspace. The workspace layout itself has just one setting, unlike Eclipse, which has the concept of multiple perspectives. IntelliJ Idea and Android Studio have a single default layout. You can manage that layout from the Window menu by either restoring the default layout, or moving a few things around and then storing that layout as the default. In my default layout, I have the Project window on the left and the Editor window on the right.
Watch what happens when I click into the Editor Window. I get a set of links across the top, and I can click on those links to jump to any part of the hierarchy. The top of the hierarchy is the project itself, then there's the app module, the source folder and then, the Java code, which has packages including com .davidgassner, .androidstudio .myfirstproject. If I click into the last part of the package, I see a list of all the classes in that package.
And I can jump to any of the classes, by clicking. If I click back on the Project window, that display at the top goes away. Because now the assumption is that you're going to navigate with this window. There are also tools to navigate around all the different windows that are a part of the user interface. You'll see tabs on the left, on the bottom and on the right. If I click on the Structure Tab, that shows me a list of my Libraries and Module Dependencies. There is the Build Variants tab, the Favorites tab, Messages, Android, Terminal, TODO and so on.
Here's how you can use one of these windows. Let's say for example that I want to assign myself a task. I'll place the cursor above this class and I'll put in a couple of slashes as a comment. And then TODO, and then remind myself to do something. Now if I click on the TODO window, and then I open up that class, I see my comment immediately. To close the TODO window, just click the link again. Notice that there are numbers next to the names of some of these tabs; these are keyboard shortcuts.
And you can use them to jump around from window to window very quickly. To use those keyboard shortcuts, hold down the Alt key on Windows, or Cmd on Mac, and press the number. Alt+0 is for Messages. Alt+6 is for Android. Alt+1 for Project, and so on. If opening one window means you aren't going to be able to see another window, that window will usually close automatically. But if Android Studio is able to fit multiple windows that you've requested, it'll try to keep them all open. Once again, to return to your default layout, choose Window > Restore Default Layout.
So those are some tips for navigating through the user interface. You can find out a lot more about the user interface and all the different windows that are a part of IntelliJ IDEA and of Android Studio by going to this webpage at confluence.jetbrain.com/display/intelliJIDEA/user interface. You'll find information here about all of the different windows, and a lot more navigational tricks than I've shown here.
Note: This course was revised on 8/20/2014 to reflect changes in the .0.8.4 beta version of Android Studio.
- Exploring Android Studio and IntelliJ IDEA
- Installing Android Studio
- Creating projects with Android Studio
- Navigating the user interface
- Designing activity layouts
- Analyzing and refactoring code
- Debugging and packaging apps
Skill Level Beginner
Q: This course was updated on 8/20/2014. What changed?
A: We revised this course to reflect changes to the Android Studio beta, released at the 2014 Google I/O conference. This update was recorded with Android Studio .0.8.4, which contains a new project wizard and updates to the Gradle build system. For more information about the changes in this course, check out the "What's new in this update" movie.