In this article You will be familiar with the android studio user interface and the android project structure. Android Studio is the official Integrated Development Interface (IDE) and id dependent on IntelliJ IDEA. Moreover it provides developers with more features that enhance your productivity when building Android apps.
Features like a flexible Gradle based build system, fast and feature-rich emulator, apply Changes to push code and resource changes to your running app without restarting your app, code templates and GitHub integration to help you build common app features and import sample code.
The user Interface
After creation of a new android studio project, you will see the following image of android studio IDE. The Android Studio main window is made up of several logical areas identified. See Image.
- The Toolbar: The android studio toolbar contains many actions like running your app setting up emulator, and SDK settings.
- The navigation bar: It helps you navigate through your project and open files for editing. It provides a more compact view of the structure visible in the Project window.
- The editor window: This is where you create and modify code. Depending on the current file type, the editor can change. For example, when viewing a layout file, the editor displays the Layout Editor.
- The tool window bar: It runs around the outside of the IDE window and contains the buttons that allow you to expand or collapse individual tool windows.
- The tool windows: It give you access to specific tasks like project management, search, version control, and more. You can expand them and collapse them.
- The status bar: It displays the status of your project and the IDE itself, as well as any warnings or messages.
Keyboard shortcuts when using Android Studio
Here is the most used keyboard shortcuts when using android studio.
- Search: by double-pressing shift Key, you can search across your source code, databases, actions, elements of the user interface.
|Tool window||Windows and Linux||Mac|
|Return to Editor||Esc||Esc|
|Hide All Tool Windows||Control+Shift+F12||Command+Shift+F12|
The following table shows the different types and ways for code completion.
|Type||Description||Windows and Linux||Mac|
|Basic Completion||Displays basic suggestions for variables, types, methods, expressions, and so on. If you call basic completion twice in a row, you see more results, including private members and non-imported static members.||Control+Space||Control+Space|
|Smart Completion||Displays relevant options based on the context. Smart completion is aware of the expected type and data flows. If you call Smart Completion twice in a row, you see more results, including chains.||Control+Shift+Space||Control+Shift+Space|
|Statement Completion||Completes the current statement for you, adding missing parentheses, brackets, braces, formatting, etc.||Control+Shift+Enter||Shift+Command+Enter|
You can also perform quick fixes and show intention actions by pressing Alt+Enter.
Android Project Structure
Now, we want more about android project structure. Each android studio project consists of one or more modules with source code files and resource files. There are three types of modules, android app modules, library modules and Google App Engine modules.
By default, Android Studio reveals the project files as the above image in the Android project screen. This view is arranged by modules to easily access the main source files of your project.
All the build files are visible at the top level under Gradle Scripts and each app module contains the following folders:
- manifests: Contains the
- java: Contains the Java source code files, including JUnit test code.
- res: Contains all non-code resources, such as XML layouts, UI strings, and bitmap images.
The arrangement of the Android project on the disc varies. Pick the project from the Project Dropdown (The following Image) to see the actual project file structure.
In The next article we will learn how to use android studio emulator and run your first android application. For further reading about android studio IDE go to android studio documentation.