{"id":37896,"date":"2016-06-17T15:00:29","date_gmt":"2016-06-17T12:00:29","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=37896"},"modified":"2023-11-09T15:21:08","modified_gmt":"2023-11-09T13:21:08","slug":"android-tutorial-beginners-with-examples","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/","title":{"rendered":"Android Tutorial For Beginners With Examples"},"content":{"rendered":"<p>There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the <strong>most popular mobile operating system<\/strong>, with almost 2 billion devices activated and it offers a unified approach to application development for mobile devices.<\/p>\n<p>That means, that developers need only develop for Android, and their applications will be able to run on different devices powered by Android. This particular asset gives Android endless possibilites! This means that and application that is designed to work on mobile phone devices can be also transfered to Android powered TV sets or Android Car systems.<\/p>\n<p>This is why, Android is an exciting space to make apps that can help you in every aspect of your life, can help you communicate, organize, educate, entertain or just to make your life easier in every device that they might run on!<br \/>\n<span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:515,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;12&quot;:0}\">[ulp id=&#8217;Ja8Orb5oPKdShcXt&#8217;]<\/span><\/p>\n<div class=\"toc\">\n<h3>Table Of Contents<\/h3>\n<dl>\n<dt><a href=\"#section_1\">1. What is Android<\/a><\/dt>\n<dt><a href=\"#section_2\">2. Installing Android Studio<\/a><\/dt>\n<dt><a href=\"#section_3\">3. Android versions and Android SDK Manager<\/a><\/dt>\n<dt><a href=\"#section_4\">4. Supporting different screen sizes<\/a><\/dt>\n<dt><a href=\"#section_5\">5. Android Project Structure<\/a><\/dt>\n<dt><a href=\"#section_6\">6. Create \u201cHello Android World\u201d application<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#section_6_1\">6.1. Create a New Android Studio Project<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#section_6_2\">6.2. Create the source code of a simple FirstAndroidApplication Activity<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#section_6_3\">6.3. Create the layout of the project<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#section_6_4\">6.4. Android Manifest<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#section_6_5\">6.5. Edit the FirstAndroidApplication dimensions<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#section_6_6\">6.6. Edit the FirstAndroidApplication strings<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#section_6_7\">6.7. Add the drawable for every screen density<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dd>\n<dl>\n<dt><a href=\"#section_6_8\">6.8. Build, compile and run<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#section_7\">7. Download the Android Studio Project<\/a><\/dt>\n<dt><a href=\"#section_8\">8. How to continue?<\/a><\/dt>\n<\/dl>\n<\/div>\n<p>In this special example, we are going to set our <strong>Android Development Studio IDE<\/strong>, make our very <strong>first Android application<\/strong> and discover the <strong>Android Development world<\/strong> in the easiest possible way.<\/p>\n<p>The mobile development world can be very fun, because the direct results we see when creating our own application, can be highly motivating and rewarding.<\/p>\n<h2><a name=\"section_1\"><\/a>1. What is Android?<\/h2>\n<p>Android is a mobile operating system currently developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets. And as we said before, Android offers a unified approach to application development for mobile devices.<\/p>\n<p>Android is an open-source operating system named Android. Google has made the code for all the low-level &#8220;stuff&#8221; as well as the needed middleware to power and use an electronic device, and gave Android freely to anyone who wants to write code and build the operating system from it. There is even a full application framework included, so third-party apps can be built and installed, then made available for the user to run as they like.<\/p>\n<p>The &#8220;proper&#8221; name for this is the Android Open Source Project, and this is what people mean when they say things like Android is open and free. Android, in this iteration, is free for anyone to use as they like.<\/p>\n<h2><a name=\"section_2\"><\/a>2. Installing Android Studio<\/h2>\n<p>In order to write an Android application, we are going to need a development environment. Google has made a very useful tool for all Android Developers, the <strong>Android Studio<\/strong>. Android Studio is the official IDE for Android development, and with a single download includes everything you need to begin developing Android apps. Included in the download kit, are the <strong>Software Development Kit (SDK)<\/strong>, with all the <strong>Android libraries<\/strong> we may need, and the infrastructure to download the many <strong>Android emulator<\/strong> instances, so that we can initially run our application, without needing a real device.<\/p>\n<p>So, we are going to download and install Android Studio.<\/p>\n<div class=\"tip\"><strong>Tip<\/strong><br \/>\nFirst we have to have installed the Java Development Kit (JDK) from Oracle. If you do not, please you should download the latest JDK from the <a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\"><strong>Oracle&#8217;s special section<\/strong><\/a> here.<\/div>\n<p><figure id=\"attachment_38141\" aria-describedby=\"caption-attachment-38141\" style=\"width: 660px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38141\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_1.jpg\" alt=\"Android Studio Installation - step 1\" width=\"660\" height=\"455\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_1.jpg 660w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_1-300x207.jpg 300w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/a><figcaption id=\"caption-attachment-38141\" class=\"wp-caption-text\">Android Studio Installation &#8211; step 1<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_38142\" aria-describedby=\"caption-attachment-38142\" style=\"width: 802px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38142\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_2.jpg\" alt=\"Android Studio Installation - step 2\" width=\"802\" height=\"600\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_2.jpg 802w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_2-300x224.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_2-768x575.jpg 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/a><figcaption id=\"caption-attachment-38142\" class=\"wp-caption-text\">Android Studio Installation &#8211; step 2<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_38143\" aria-describedby=\"caption-attachment-38143\" style=\"width: 801px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_3.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38143\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_3.jpg\" alt=\"Android Studio Installation - step 3\" width=\"801\" height=\"603\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_3.jpg 801w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_3-300x226.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_3-768x578.jpg 768w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/a><figcaption id=\"caption-attachment-38143\" class=\"wp-caption-text\">Android Studio Installation &#8211; step 3<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_38144\" aria-describedby=\"caption-attachment-38144\" style=\"width: 802px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_4.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38144\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_4.jpg\" alt=\"Android Studio Installation - step 4\" width=\"802\" height=\"600\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_4.jpg 802w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_4-300x224.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_4-768x575.jpg 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/a><figcaption id=\"caption-attachment-38144\" class=\"wp-caption-text\">Android Studio Installation &#8211; step 4<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_38145\" aria-describedby=\"caption-attachment-38145\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_5.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38145\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_5.jpg\" alt=\"Android Studio Installation - step 5\" width=\"800\" height=\"601\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_5.jpg 800w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_5-300x225.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_5-768x577.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-38145\" class=\"wp-caption-text\">Android Studio Installation &#8211; step 5<\/figcaption><\/figure><br \/>\n<figure id=\"attachment_38146\" aria-describedby=\"caption-attachment-38146\" style=\"width: 666px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38146\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6.jpg\" alt=\"Android Studio Installation - Ready\" width=\"666\" height=\"457\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6.jpg 666w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6-300x206.jpg 300w\" sizes=\"(max-width: 666px) 100vw, 666px\" \/><\/a><figcaption id=\"caption-attachment-38146\" class=\"wp-caption-text\">Android Studio Installation &#8211; Ready<\/figcaption><\/figure><\/p>\n<h2><a name=\"section_3\"><\/a>3. Android versions and Android SDK Manager<\/h2>\n<p>Google, releases almost every year (or even sooner than a year), a <strong>new Android version<\/strong> in order to update the mobile operating system, so that it contains <strong>new features and possibilities<\/strong> and of course to fix things that might not work in the right way.<\/p>\n<p>So, each version of Android has it\u2019s own <strong>SDK<\/strong> (software development kit), so that we can use to build apps that can run on and include all the latest features Android has added in its latest versions.<\/p>\n<p>This means that it is essential that we keep up updating our applications with the latest features all the time, and if possible, without losing the consistency of the previous Android versions.<\/p>\n<p>As part of the Setup Wizard you will already have the latest SDK available to you, however it\u2019s useful to know how to install additional SDK\u2019s if you need to work with older devices that do not run the latest version of Android.<\/p>\n<p>SDK\u2019s allow you to create AVD\u2019s (Android Virtual Devices) to test your Apps on, customized to your personal configuration. Want to see how your Android App looks on a TV sized screen? If you have a screen big enough you can find out.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2><a name=\"section_4\"><\/a>4. Supporting different screen sizes<\/h2>\n<p>Android runs on a variety of devices that offer different <strong>screen sizes and densities<\/strong>. This means that Android can handle applications that run on small mobile phone devices, as well as applications that run on large tablet densities.<\/p>\n<p>This feature gives Android a great advantage, but also, although the system performs scaling and resizing on different screens, developers should make the effort to optimize their application for different screen sizes and densities. Android system provides a consistent development environment across devices and handles most of the work to adjust each application&#8217;s user interface to the screen on which it is displayed. At the same time, the system provides APIs that allow you to control your application&#8217;s UI for specific screen sizes and densities, in order to optimize your UI design for different screen configurations. For example, you might want a UI for tablets that&#8217;s different from the UI for handsets.<\/p>\n<p>Below is an introduction to the terms and concepts used, a summary of the screen configurations that the system supports, and an overview of the API and underlying screen-compatibility features:<\/p>\n<p><strong>Screen size<\/strong><br \/>\nActual physical size, measured as the screen&#8217;s diagonal.<br \/>\nFor simplicity, Android groups all actual screen sizes into four generalized sizes: small, normal, large, and extra-large.<\/p>\n<p><strong>Screen density<\/strong><br \/>\nThe quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For example, a &#8220;low&#8221; density screen has fewer pixels within a given physical area, compared to a &#8220;normal&#8221; or &#8220;high&#8221; density screen.<br \/>\nFor simplicity, Android groups all actual screen densities into six generalized densities: low, medium, high, extra-high, extra-extra-high, and extra-extra-extra-high.<\/p>\n<p><strong>Orientation<\/strong><br \/>\nThe orientation of the screen from the user&#8217;s point of view. This is either landscape or portrait, meaning that the screen&#8217;s aspect ratio is either wide or tall, respectively. Be aware that not only do different devices operate in different orientations by default, but the orientation can change at runtime when the user rotates the device.<\/p>\n<p><strong>Resolution<\/strong><br \/>\nThe total number of physical pixels on a screen. When adding support for multiple screens, applications do not work directly with resolution; applications should be concerned only with screen size and density, as specified by the generalized size and density groups.<\/p>\n<p><strong>Density-independent pixel (dp)<\/strong><br \/>\nA virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way.<br \/>\nThe density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a &#8220;medium&#8221; density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi \/ 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your application&#8217;s UI, to ensure proper display of your UI on screens with different densities.<\/p>\n<p>Android provides support for multiple screen sizes and densities, reflecting the many different screen configurations that a device may have. You can use features of the Android system to optimize your application&#8217;s user interface for each screen configuration and ensure that your application not only renders properly, but provides the best user experience possible on each screen.<\/p>\n<p>To simplify the way that you design your user interfaces for multiple screens, Android divides the range of actual screen sizes and densities into sizes: small, normal, large, and xlarge<\/p>\n<p>A set of six generalized densities:<\/p>\n<ul>\n<li><strong>ldpi<\/strong> (low) ~120dpi<\/li>\n<li><strong>mdpi<\/strong> (medium) ~160dpi<\/li>\n<li><strong>hdpi<\/strong> (high) ~240dpi<\/li>\n<li><strong>xhdpi<\/strong> (extra-high) ~320dpi<\/li>\n<li><strong>xxhdpi<\/strong> (extra-extra-high) ~480dpi<\/li>\n<li><strong>xxxhdpi<\/strong> (extra-extra-extra-high) ~640dpi<\/li>\n<\/ul>\n<h2><a name=\"section_5\"><\/a>5. Android Project Structure<\/h2>\n<p>Before we try to make our first Android application, we should first see the basic parts of an Android application project, in order to recognize them and be able to understand them better.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Activities<\/strong><br \/>\nThe Activities are the main Java classes, that contain the Android code with which we are going to develop, what do we want the application to do.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Layouts<\/strong><br \/>\nThe Layouts are the main xml files, that contain the Android xml code with which we are going to develop, how will our application views look like.<\/li>\n<li><strong>Values<\/strong><br \/>\nThe Layouts are the main xml files, that contain the Android xml code with which we are going to develop, how will our application views look like.<\/p>\n<ul>\n<li><span style=\"text-decoration: underline;\">Animation Resources<\/span><\/li>\n<li><span style=\"text-decoration: underline;\">Color State List Resource<\/span><\/li>\n<li><span style=\"text-decoration: underline;\">Drawable Resources<\/span><\/li>\n<li><span style=\"text-decoration: underline;\">Layout Resource<\/span><\/li>\n<li><span style=\"text-decoration: underline;\">Menu Resource<\/span><\/li>\n<li><span style=\"text-decoration: underline;\">String Resources<\/span><\/li>\n<li><span style=\"text-decoration: underline;\">Style Resource<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Drawables<\/strong><br \/>\nA drawable resource is a general concept for a graphic that can be drawn to the screen. There are several different types of drawables:<\/p>\n<ul>\n<li><span style=\"text-decoration: underline;\">Bitmap File<\/span><br \/>\nA bitmap graphic file (.png, .jpg, or .gif). Creates a BitmapDrawable.<\/li>\n<li><span style=\"text-decoration: underline;\">Nine-Patch File<\/span><br \/>\nA PNG file with stretchable regions to allow image resizing based on content (.9.png). Creates a NinePatchDrawable.<\/li>\n<li><span style=\"text-decoration: underline;\">Layer List<\/span><br \/>\nA Drawable that manages an array of other Drawables. These are drawn in array order, so the element with the largest index is be drawn on top. Creates a LayerDrawable.<\/li>\n<li><span style=\"text-decoration: underline;\">State List<\/span><br \/>\nAn XML file that references different bitmap graphics for different states (for example, to use a different image when a button is pressed). Creates a StateListDrawable.<\/li>\n<li><span style=\"text-decoration: underline;\">Level List<\/span><br \/>\nAn XML file that defines a drawable that manages a number of alternate Drawables, each assigned a maximum numerical value. Creates a LevelListDrawable.<\/li>\n<li><span style=\"text-decoration: underline;\">Transition Drawable<\/span><br \/>\nAn XML file that defines a drawable that can cross-fade between two drawable resources. Creates a TransitionDrawable.<\/li>\n<li><span style=\"text-decoration: underline;\">Inset Drawable<\/span><br \/>\nAn XML file that defines a drawable that insets another drawable by a specified distance. This is useful when a View needs a background drawble that is smaller than the View&#8217;s actual bounds.<\/li>\n<li><span style=\"text-decoration: underline;\">Clip Drawable<\/span><br \/>\nAn XML file that defines a drawable that clips another Drawable based on this Drawable&#8217;s current level value. Creates a ClipDrawable.<\/li>\n<li><span style=\"text-decoration: underline;\">Scale Drawable<\/span><br \/>\nAn XML file that defines a drawable that changes the size of another Drawable based on its current level value. Creates a ScaleDrawable<\/li>\n<li><span style=\"text-decoration: underline;\">Shape Drawable<\/span><br \/>\nAn XML file that defines a geometric shape, including colors and gradients. Creates a ShapeDrawable.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Once our app is ready, we will use a build tool to compile all the project files and package them together into an .apk file that you can run on Android devices and\/or submit to Google Play.<\/p>\n<h2><a name=\"section_6\"><\/a>6. Create &#8220;Hello Android World&#8221; application<\/h2>\n<h3><a name=\"section_6_1\"><\/a>6.1. Create a New Android Studio Project<\/h3>\n<p>Open Android Studio and choose \u201cStart a new Android Studio Project\u201d in the welcome screen.[ulp id='Ja8Orb5oPKdShcXt']<\/p>\n<p><figure id=\"attachment_38146\" aria-describedby=\"caption-attachment-38146\" style=\"width: 666px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38146\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6.jpg\" alt=\"\u201cWelcome to Android Studio\u201d screen. Choose \u201cStart a new Android Studio Project\u201d.\" width=\"666\" height=\"457\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6.jpg 666w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/android_installation_6-300x206.jpg 300w\" sizes=\"(max-width: 666px) 100vw, 666px\" \/><\/a><figcaption id=\"caption-attachment-38146\" class=\"wp-caption-text\">\u201cWelcome to Android Studio\u201d screen. Choose \u201cStart a new Android Studio Project\u201d.<\/figcaption><\/figure><\/p>\n<p>Specify the name of the application, the project and the package.<\/p>\n<p><figure id=\"attachment_38386\" aria-describedby=\"caption-attachment-38386\" style=\"width: 700px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38386\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication1.jpg\" alt=\"\u201cConfigure your new project\u201d screen. Add your application name and the projects package name.\" width=\"700\" height=\"467\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication1.jpg 700w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication1-300x200.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><figcaption id=\"caption-attachment-38386\" class=\"wp-caption-text\">\u201cConfigure your new project\u201d screen. Add your application name and the projects package name.<\/figcaption><\/figure><\/p>\n<p>In the next window, select the form factors your app will run on.<\/p>\n<p><figure id=\"attachment_38385\" aria-describedby=\"caption-attachment-38385\" style=\"width: 700px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication2.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38385\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication2.jpg\" alt=\"\u201cTarget Android Devices\u201d screen.\" width=\"700\" height=\"467\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication2.jpg 700w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication2-300x200.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><figcaption id=\"caption-attachment-38385\" class=\"wp-caption-text\">\u201cTarget Android Devices\u201d screen.<\/figcaption><\/figure><\/p>\n<p>In the next window you should choose \u201cAdd no activity\u201d. In this example, we are going to create our Activity.<\/p>\n<p><figure id=\"attachment_38384\" aria-describedby=\"caption-attachment-38384\" style=\"width: 700px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication3.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38384\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication3.jpg\" alt=\"\u201cAdd an activity to Mobile\u201d. Choose: \u201cAdd no activity\u201d.\" width=\"700\" height=\"466\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication3.jpg 700w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication3-300x200.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/a><figcaption id=\"caption-attachment-38384\" class=\"wp-caption-text\">\u201cAdd an activity to Mobile\u201d. Choose: \u201cAdd no activity\u201d.<\/figcaption><\/figure><\/p>\n<p>Now, our project has just been created!<\/p>\n<h3><a name=\"section_6_2\"><\/a>6.2. Create the source code of a simple FirstAndroidApplication Activity<\/h3>\n<p>Add a new Java class Activity inside <code>src\/com.javacodegeeks.FirstAndroidApplication\/<\/code> so that we are going to have the <code>src\/com.javacodegeeks.FirstAndroidApplication\/FirstActivity.java<\/code> file and paste the code below.<\/p>\n<p><em><span style=\"text-decoration: underline;\">FirstActivity.java<\/span><\/em><\/p>\n<pre class=\"brush:java; wrap-lines:false\">package com.javacodegeeks.FirstAndroidApplication;\n\nimport android.app.Activity;\nimport android.os.Bundle;\n\npublic class FirstActivity extends Activity {\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.main_layout);\n    }\n\n}\n<\/pre>\n<h3><a name=\"section_6_3\"><\/a>6.3. Create the layout of the project<\/h3>\n<p>Add a new xml file inside <code>\/res\/layout<\/code> folder, with name <code>main_layout.xml<\/code>. We should have the <code>\/res\/layout\/main_layout.xml<\/code> file and paste the code below.<\/p>\n<p><em><span style=\"text-decoration: underline;\">main_layout.xml<\/span><\/em><\/p>\n<pre class=\"brush:xml; wrap-lines:false;\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"#ededed\"\n    android:gravity=\"center\"\n    android:orientation=\"vertical\"&gt;\n\n    &lt;TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:layout_marginTop=\"@dimen\/textmargin\"\n        android:gravity=\"center\"\n        android:textSize=\"25dp\"\n        android:text=\"@string\/helloAndroid\" \/&gt;\n\n    &lt;ImageView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_margin=\"@dimen\/logomargin\"\n        android:background=\"@drawable\/ic_social_mood\" \/&gt;\n\n&lt;\/LinearLayout&gt;<\/pre>\n<h3><a name=\"section_6_4\"><\/a>6.4. Android Manifest<\/h3>\n<p>Edit the <code>AndroidManifest.xml<\/code> file inside <code>\/app\/manifests<\/code> folder.<br \/>\nThe AndroidManifest.xml of our project is simple and should be like this:<\/p>\n<p><em><span style=\"text-decoration: underline;\">AndroidManifest.xml<\/span><\/em><\/p>\n<pre class=\"brush:xml; wrap-lines:false;\">&lt;manifest xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\n    package=\"com.javacodegeeks.FirstAndroidApplication\"&gt;\n    &lt;application\n        android:allowBackup=\"true\"\n        android:icon=\"@mipmap\/ic_launcher\"\n        android:label=\"@string\/app_name\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style\/AppTheme\"&gt;\n        &lt;activity\n            android:name=\".FirstActivity\"\n            android:label=\"@string\/app_name\"\n            android:screenOrientation=\"portrait\"\n            android:theme=\"@android:style\/Theme.NoTitleBar.Fullscreen\"&gt;\n            &lt;intent-filter&gt;\n                &lt;action android:name=\"android.intent.action.MAIN\" \/&gt;\n                &lt;category android:name=\"android.intent.category.LAUNCHER\" \/&gt;\n            &lt;\/intent-filter&gt;\n        &lt;\/activity&gt;\n    &lt;\/application&gt;\n&lt;\/manifest&gt;<\/pre>\n<h3><a name=\"section_6_5\"><\/a>6.5. Edit the FirstAndroidApplication dimensions<\/h3>\n<p>Add a new xml file inside <code>\/res\/values<\/code> folder, with name <code>dimens.xml<\/code>. We should have the <code>\/res\/values\/dimens.xml<\/code> file and paste the code below.<\/p>\n<p><em><span style=\"text-decoration: underline;\">dimens.xml<\/span><\/em><\/p>\n<pre class=\"brush:xml; wrap-lines:false;\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;resources&gt;\n    &lt;dimen name=\"logomargin\"&gt;20dp&lt;\/dimen&gt;\n    &lt;dimen name=\"textmargin\"&gt;10dp&lt;\/dimen&gt;\n&lt;\/resources&gt;<\/pre>\n<h3><a name=\"section_6_6\"><\/a>6.6. Edit the FirstAndroidApplication strings<\/h3>\n<p>Add a new xml file inside <code>\/res\/values<\/code> folder, with name <code>strings.xml<\/code>. We should have the <code>\/res\/values\/strings.xml<\/code> file and paste the code below.<\/p>\n<p><em><span style=\"text-decoration: underline;\">strings.xml<\/span><\/em><\/p>\n<pre class=\"brush:xml; wrap-lines:false;\">&lt;resources&gt;\n    &lt;string name=\"app_name\"&gt;AndroidFirstApplication&lt;\/string&gt;\n    &lt;string name=\"helloAndroid\"&gt;Hello Android!&lt;\/string&gt;\n&lt;\/resources&gt;<\/pre>\n<h3><a name=\"section_6_7\"><\/a>6.7. Add the drawable for every screen density<\/h3>\n<p>Inside <code>\/res\/values<\/code> folder, we should add the folders for each screen dimension we have, and add the specific drawable for each one.<\/p>\n<p><figure id=\"attachment_38391\" aria-describedby=\"caption-attachment-38391\" style=\"width: 465px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication4.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38391\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication4.jpg\" alt=\"Add the drawables for every screen density.\" width=\"465\" height=\"348\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication4.jpg 465w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication4-300x225.jpg 300w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><\/a><figcaption id=\"caption-attachment-38391\" class=\"wp-caption-text\">Add the drawables for every screen density.<\/figcaption><\/figure><\/p>\n<p>In this way, we are going to have the right drawable dimension for every different screen density.<\/p>\n<h3><a name=\"section_6_8\"><\/a>6.8. Build, compile and run<\/h3>\n<p>When we are ready, we build our application by pressing the play button in our AndroidStudio main toolbar.<\/p>\n<p><figure id=\"attachment_38396\" aria-describedby=\"caption-attachment-38396\" style=\"width: 128px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/Screen-Shot-2016-06-14-at-2.51.28-AM.png\"><img decoding=\"async\" class=\"size-full wp-image-38396\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/Screen-Shot-2016-06-14-at-2.51.28-AM.png\" alt=\"Compile and run.\" width=\"128\" height=\"27\" \/><\/a><figcaption id=\"caption-attachment-38396\" class=\"wp-caption-text\">Compile and run.<\/figcaption><\/figure><\/p>\n<p>After we build, compile and run our project, the main FirstAndroidApplication application should look like this:<\/p>\n<p><figure id=\"attachment_38394\" aria-describedby=\"caption-attachment-38394\" style=\"width: 394px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication5.jpg\"><img decoding=\"async\" class=\"size-full wp-image-38394\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication5.jpg\" alt=\"This is our FirstAndroidApplication.\" width=\"394\" height=\"700\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication5.jpg 394w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/firstandroidapplication5-169x300.jpg 169w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/a><figcaption id=\"caption-attachment-38394\" class=\"wp-caption-text\">This is our FirstAndroidApplication.<\/figcaption><\/figure><\/p>\n<h2><a name=\"section_7\"><\/a>7.Download the Android Studio Project<\/h2>\n<p>This was an example of first Android application.<\/p>\n<div class=\"download\"><strong>Download<br \/>\n<\/strong>You can download the full source code of this example here:\u00a0<a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/06\/FirstAndroidApplication.zip\"><strong>FirstAndroidApplication<\/strong><\/a><\/div>\n<h2><a name=\"section_8\"><\/a>8. How to continue?<\/h2>\n<p>Here is a list of basic Android tutorials, that you can follow in order to make the first basic steps in the Android World:<\/p>\n<p>Android Layouts and\u00a0Views<\/p>\n<ul>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/framelayout\/android-framelayout-example\/\">Android FrameLayout Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/linearlayout\/android-linearlayout-example\/\">Android LinearLayout Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/imageview\/android-imageview-example\/\">Android ImageView Example <\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/widget\/textview\/android-textview-example\/\">Android TextView Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/button\/android-button-example\/\">Android Button Example<\/a><\/li>\n<\/ul>\n<p>Android Click and Drag Listeners<\/p>\n<ul>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/view\/onclicklistener\/android-onclicklistener-example\/\">Android OnClickListener Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/drag-and-drop\/android-drag-and-drop-example\/\">Android Drag and Drop Example<\/a><\/li>\n<\/ul>\n<p>Android\u00a0Styles and UI Elements<\/p>\n<ul>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/android-styles-and-themes-example\/\">Android Styles and Themes Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/ui\/toast\/android-toast-example\/\">Android Toast Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/android-toolbar-example\/\">Android Toolbar Example<\/a><\/li>\n<\/ul>\n<p>Android Activities<\/p>\n<ul>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/core\/activity\/android-activity-transition-example\/\">Android Activity Transition Example<\/a><\/li>\n<\/ul>\n<p>Android Development<\/p>\n<ul>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/building-android-applications-gradle\/\">Building Android Applications with Gradle<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/android\/android-project-migration-eclipse-android-studio\/\">Android Project migration from Eclipse to Android Studio<\/a><\/li>\n<\/ul>\n<p>Of course the most accurate and complete guide, is the official Android Developers Guide, that covers every aspect of the Android Development:<\/p>\n<ul>\n<li><a href=\"https:\/\/developer.android.com\/guide\/index.html\">Official Android Developers Guide<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the most popular mobile operating system, with almost 2 billion devices activated and it offers a unified approach to application development for mobile devices. That means, that developers need only &hellip;<\/p>\n","protected":false},"author":14,"featured_media":1202,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[173,1512,1233,1227,1511],"class_list":["post-37896","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-android-2","tag-android-develop","tag-android-developement","tag-android-studio","tag-first-android-application"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android Tutorial For Beginners With Examples - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Tutorial For Beginners With Examples - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-17T12:00:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-09T13:21:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Chryssa Aliferi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chryssa Aliferi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/\"},\"author\":{\"name\":\"Chryssa Aliferi\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/863144453b9fc15d4184d71833dcf332\"},\"headline\":\"Android Tutorial For Beginners With Examples\",\"datePublished\":\"2016-06-17T12:00:29+00:00\",\"dateModified\":\"2023-11-09T13:21:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/\"},\"wordCount\":2468,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"keywords\":[\"android\",\"android develop\",\"Android developement\",\"Android Studio\",\"first android application\"],\"articleSection\":[\"Android\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/\",\"name\":\"Android Tutorial For Beginners With Examples - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"datePublished\":\"2016-06-17T12:00:29+00:00\",\"dateModified\":\"2023-11-09T13:21:08+00:00\",\"description\":\"There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/android\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Android Tutorial For Beginners With Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/863144453b9fc15d4184d71833dcf332\",\"name\":\"Chryssa Aliferi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/Chryssa-Aliferi-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/Chryssa-Aliferi-96x96.jpg\",\"caption\":\"Chryssa Aliferi\"},\"description\":\"Chryssa is a Computer Science graduate from Athens University of Economic and Business. During her studies, Chryssa carried out a great variety of projects ranging from networking to software engineering. She is very keen on front end development especially on mobile technologies and web applications. She has worked as a junior Software Engineer in the telecommunications area and currently works as an Android Developer.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/chryssa-aliferi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Tutorial For Beginners With Examples - Java Code Geeks","description":"There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"Android Tutorial For Beginners With Examples - Java Code Geeks","og_description":"There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the","og_url":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2016-06-17T12:00:29+00:00","article_modified_time":"2023-11-09T13:21:08+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","type":"image\/jpeg"}],"author":"Chryssa Aliferi","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Chryssa Aliferi","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/"},"author":{"name":"Chryssa Aliferi","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/863144453b9fc15d4184d71833dcf332"},"headline":"Android Tutorial For Beginners With Examples","datePublished":"2016-06-17T12:00:29+00:00","dateModified":"2023-11-09T13:21:08+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/"},"wordCount":2468,"commentCount":2,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","keywords":["android","android develop","Android developement","Android Studio","first android application"],"articleSection":["Android"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/","url":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/","name":"Android Tutorial For Beginners With Examples - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","datePublished":"2016-06-17T12:00:29+00:00","dateModified":"2023-11-09T13:21:08+00:00","description":"There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/android-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/android\/android-tutorial-beginners-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Android","item":"https:\/\/examples.javacodegeeks.com\/category\/android\/"},{"@type":"ListItem","position":3,"name":"Android Tutorial For Beginners With Examples"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/863144453b9fc15d4184d71833dcf332","name":"Chryssa Aliferi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/Chryssa-Aliferi-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/03\/Chryssa-Aliferi-96x96.jpg","caption":"Chryssa Aliferi"},"description":"Chryssa is a Computer Science graduate from Athens University of Economic and Business. During her studies, Chryssa carried out a great variety of projects ranging from networking to software engineering. She is very keen on front end development especially on mobile technologies and web applications. She has worked as a junior Software Engineer in the telecommunications area and currently works as an Android Developer.","sameAs":["http:\/\/www.javacodegeeks.com\/"],"url":"https:\/\/examples.javacodegeeks.com\/author\/chryssa-aliferi\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/37896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=37896"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/37896\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1202"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=37896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=37896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=37896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}