{"id":14,"date":"2018-02-07T09:47:02","date_gmt":"2018-02-07T09:47:02","guid":{"rendered":"https:\/\/nezis.gr\/?p=14"},"modified":"2021-12-09T07:44:27","modified_gmt":"2021-12-09T07:44:27","slug":"first-simple-android-program","status":"publish","type":"post","link":"https:\/\/nezis.gr\/?p=14","title":{"rendered":"First simple Android program"},"content":{"rendered":"<p><a href=\"https:\/\/nezis.gr\/wp-content\/uploads\/2018\/02\/First-simple-Android-program.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15\" src=\"https:\/\/nezis.gr\/wp-content\/uploads\/2018\/02\/First-simple-Android-program.png\" alt=\"\" width=\"1152\" height=\"648\" srcset=\"https:\/\/nezis.gr\/wp-content\/uploads\/2018\/02\/First-simple-Android-program.png 1152w, https:\/\/nezis.gr\/wp-content\/uploads\/2018\/02\/First-simple-Android-program-300x169.png 300w, https:\/\/nezis.gr\/wp-content\/uploads\/2018\/02\/First-simple-Android-program-768x432.png 768w, https:\/\/nezis.gr\/wp-content\/uploads\/2018\/02\/First-simple-Android-program-1024x576.png 1024w\" sizes=\"auto, (max-width: 1152px) 100vw, 1152px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<dl>\n<dt><b>app &gt; java &gt; com.example.myfirstapp &gt; MainActivity<\/b><\/dt>\n<dd>This is the main activity (the entry point for your app). When you build and run the app, the system launches an instance of this <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/Activity.html\">Activity<\/a><\/code> and loads its layout.<\/dd>\n<dt><b>app &gt; res &gt; layout &gt; activity_main.xml<\/b><\/dt>\n<dd>This XML file defines the layout for the activity&#8217;s UI. It contains a <code><a href=\"https:\/\/developer.android.com\/reference\/android\/widget\/TextView.html\">TextView<\/a><\/code> element with the text &#8220;Hello world!&#8221;.<\/dd>\n<dt><b>app &gt; manifests &gt; AndroidManifest.xml<\/b><\/dt>\n<dd>The <a href=\"https:\/\/developer.android.com\/guide\/topics\/manifest\/manifest-intro.html\">manifest file<\/a> describes the fundamental characteristics of the app and defines each of its components.<\/dd>\n<dt><b>Gradle Scripts &gt; build.gradle<\/b><\/dt>\n<dd>You&#8217;ll see two files with this name: one for the project and one for the &#8220;app&#8221; module. Each module has its own <code>build.gradle<\/code> file, but this project currently has just one module. You&#8217;ll mostly work with the module&#8217;s <code>build.gradle<\/code> file to configure how the Gradle tools compile and build your app. For more information about this file, see <a href=\"https:\/\/developer.android.com\/studio\/build\/index.html\">Configure Your Build<\/a>.<\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[3,4,6,7],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-android-studio","tag-java","tag-override"],"_links":{"self":[{"href":"https:\/\/nezis.gr\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nezis.gr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nezis.gr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nezis.gr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nezis.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":6,"href":"https:\/\/nezis.gr\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/nezis.gr\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/nezis.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nezis.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nezis.gr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}