Hello Friends, Welcome back to another tutorial, and in this tutorial, we will see How to Use Android Studio and a real quick comprehensive overview of the interface of Android Studio.
For newcomers, when they start to Android studio, it can become a kind of overwhelming, not really knowing what these components are and a bit of confusing to understand the interface of Android Studio. Therefore in this tutorial, we will see a quick guide to understand the user interface of the Android Studio IDE.
So without wasting any time, let’s start our tutorial.
How to Use Android Studio ?
To know the user interface of Android Studio, first of all, we need to create a Project in Android Studio so that we will get inside the Android Studio.
- Launch Android Studio, a window will open and from there click on “Start a new Android Studio project”.
- In the next window, Android Studio will ask you to select the type of your project from a variety of project templates. Some templates provide starter code for general usage contexts like Navigation Drawer, Login Screen etc. For the moment I am choosing an Empty Activity and clicking on the Next button.
- In the next window, you require to fill up a few fields and pick options according to your project.
- Let’s have a quick look at the pieces of information that have been provided in the above window.
- Name is the name given to your Application.
- Package Name is a unique name given to identify a specific application. Generally, it is in the form of domain.company.application but it is entirely up to you to choose the name.
- In Save location, it asks you for the location where you want to save your project.
- In Language section, it asks you to choose the language either Java or Kotlin to build your application.
- In Minimum API level basically, it asks you to set the minimum Android version for your application to run.
- This project will support instant apps is a feature that lets end users use that app without fully downloading onto their phone.
- Once you filled up all the information, Just click on the Finish button and Android Studio will start to build and synchronize your project.
- After we have successfully built our project, Now we will have a tour of the Android Studio user interface.
Android Studio User Interface
When we see the user interface of Android Studio, it can be kind of confusing for the first time. To make it easier for you, I have divided the user interface into different- different parts and will discuss each section separately
Let’s have a look at the Android Studio User Interface.
- Now let’s see the explanation of each section.
A – Menu Bar
- At the top of the user interface of Android studio, you can see a thin horizontal bar consisting of the labels of drop-down menus.This thin horizontal bar is called Menu Bar.
- In Menu Bar we can find the majority of Android Studio’s essential functions and settings such as opening a project, editing tools (cut, copy, paste), running an application, exiting the program and several other functionalities.
- It actually shows the path of the current file that we are working on.
- The cool thing about the Navigation bar is when you click on any one of the directories its going to show you all the contents of that directory.
C – Toolbar
- At the right side of the Navigation bar, we can see a horizontal bar with clickable icons that performs specific functions.This horizontal bar is known as Toolbar.
- A toolbar is shortcuts of more commonly used features of the program.
- They are intended to provide instant access to the user’s commonly used functions.
D – Tool Window Bar
- It is a vertical and horizontal bar located on the sides, and top and bottom of the main window (as indicated by arrows in the above image) consist of Multiple options which we can expand and hide by clicking on them.
- We can also change the position of the options just by clicking and dragging them from one place to the other specified location.
- The options which are prefixed with a number indicates that they can also be displayed by pressing the Alt key along with the number in the keyboard.
- Each tool window consists of its individual toolbar with various options and settings (as indicated in the following image), and we can customize them as per our requirement.
- There are a variety of tool windows in Android Studio, and some of them are as follows.
- It gives an overview of the file structure of our project.
- It enables us to see our project from various viewpoints and create new items such as files, directories, classes, layouts, resources, and accessing them through navigation.
- It also allows us to open the code in the editor window just by navigating to the code fragment of interest.
- It allows us to visualize our assets (Drawable, Layouts, Colors) in an organized way.
- Layout Captures shows all the Layouts that were captured by the Layout Inspector.
- A variety of project items can be added to favorites by just right-clicking on the element and selecting the Add to Favorites option.
- Any item that has been added to favorite can be accessed through the favorite tool window.
- It allows us to choose and configure different build targets for our application.
- It gives high-level information about the structure of the source file that is currently displaying in the Editor window.
- This information includes the name of the classes, methods, variables, name of the views Etc.
- Its purpose is to display all the log messages and system message from a running application.
- This TODO tool window allows us to analyze the items from the project that is yet to be finished.
- The TODO tool window has three tabs,
- Project – It displays TODO items for the entire project.
- Current File – It displays TODO items for the file currently open in the editor window.
- Scope Based – It displays TODO items for a particular scope.
- This tool Window allows us to use the command-line interface inside the IDE.
- By default, it points to the current project directory.
- It shows information about the build processes while the application is being compiled and give the details of any errors or warnings encountered.
- This tool window becomes available when the application is running and gives the run details of the app as well as any errors encountered while running or installing the application.
- This tool window presents us information about the events and actions which are performed inside the Android studio with their exact timings.
Device File Explorer
- The Device File Explorer allows us to view, copy, delete and explore the file systems of a currently connected Android device or emulator.
- This tool window allows us to inspect all the tasks which are associated with the project build configuration and creating it into an executable application.
- This tool window gets available while editing any layout file in the Editor window.
- It allows us to view and edit the layout file in a graphical user interface style.
There is another way of quick access to the tool windows by just hovering over the mouse pointer to the bottom-left corner of the Android Studio. A pop-up menu will show up (as shown in the below image), and from there you can select the particular item.
E – Project Tool Window
- This tool window is one of the tool windows that appear by default in the Android Studio user interface.
- It allows us to see all the files related to our project in a hierarchical manner, and we can go through the files by quickly navigating through them.
- We can see the files from various viewpoints and by default Android Studio uses Android view mode which is generally used in the interface.
- Let’s have a quick look at the details of the files.
- It consists of a file named AndroidManifest.xml, which contains all essential pieces of information about our Android application.
- It contains information about the package name, which acts as a unique identifier for the application.
- It contains information about all the permissions that the application will require to run it correctly.
- It contains information about all the components of the application such as activities, services, broadcast receivers Etc.
- It contains information about which Activity will act as a Launcher Activity.
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.myapplication"> <uses-permission android:name="android.permission.CAMERA"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
- It contains all the files related to Java and Kotlin, and we can click on them to edit in the Editor window.
- It primarily contains four types of folders.
- drawable – It contains all the bitmap graphic files(.png, .jpg, .gif Etc) that our application requires.
- layout – It contains XML files related to user interface layout.
- mipmap – It contains icons of different-different resolutions for different-different types of devices that we would like to use in our application.
- values – It contains three types of files.
- colors.xml – It is an XML file which contains color values that we would like to use in our project.
- string.xml – It is an XML file that contains string values that we would like to use in our project.
- styles.xml – It is an XML file that contains different types of styles such as themes of our project and we can also create our own customized theme.
- It contains all the files related to project build configuration and helps to automate the tasks such as creating an executable APK by combining the java and xml files.
F – Editor Window
- In this window, we can see and edit our files such as Java files, Kotlin files and XML files Etc.
- The appearance of the Editor window can be changed depending upon the kind of File we are editing.
- We can open multiple files in the Editor window, and a tab represents each File which is positioned on the top end of the editor window.
- We can switch over to the particular File by clicking on the tab associated with that File.
- While Editing any XML layout file, we can either choose design mode or text mode.
- In design mode, we can visually drag and drop components to our layout.
G – Status Bar
- It shows informational messages and status of our project/activities in the Android Studio.
Changing Theme of Android Studio
- To change the theme of Android studio, Go to File>Settings. A new window will open and from there Go to Appearance & Behaviour>Appearance.
- Now in the theme section, you can see the three options Darcula, High contrast, and IntelliJ and you can choose any one amongst them as per your taste.
- Let’s have a look at the Android Studio user interface after applying Darcula theme.
So finally we have covered up all the necessary details about how to use Android Studio, and if you still find something is missing, then please let us know through your comments.
Previous post – How to Create AVD in Android Studio – Android Virtual Device