In this post I will continue going over Android Studio and finish with a simple “Hello World” app.
If you haven’t already, please go over the Part 1 of this intro series before this one.
As you can see in the image above there are two main windows that open up once you’re done with the part1. On the left side you have different modes to display your project files and on the right side is the editor with the currently opened file which happens to be MainActivity.java in our case which is also the default name for activity file (we will go over activity files in the later posts).
Modes are different ways that Android Studio can display the structure of your project or files. Usually project mode is the preferred mode for most developers and that’s what I’m going to use here.
Above you can see the file structure of project mode. The src folder will contain most of your files including the activity files and layout files.
On the right side you have editor that lets you edit your files and also the layout editor. Let’s switch to layout editor by clicking on activity_main.xml.
Layout editor is where (as the name suggests) you can visually design the layout of your app. You can drag and drop various visual elements from the palette and edit their properties in the window on the right.
As you can see I have the “Hello World” text added to my app.
Emulator is basically how you emulate a phone or any android based device to test your app.
Follow the gif below to open an emulator.
Now we will build and launch our emulator.
Once launched your emulator should look like below.
Now we are ready to build and launch our first “Hello World” app. Click on the green button as shown below to build and launch your app in emulator.
A window will pop up, click ok and after a few seconds or minutes depending how fast your computer is your app will load up in emulator as shown below.
There it is your first ever android app.
I hope you enjoyed this post, please let me know your comments or concerns in the comments below. We will start building some more exciting apps in the future posts.