{"id":332,"date":"2019-05-23T10:51:57","date_gmt":"2019-05-23T08:51:57","guid":{"rendered":"urn:uuid:1d94c797-b279-461d-a5d9-c61d17d95790"},"modified":"2019-05-23T10:53:45","modified_gmt":"2019-05-23T08:53:45","slug":"android-studio-4","status":"publish","type":"post","link":"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/","title":{"rendered":"Android Studio 4"},"content":{"rendered":"

Gestern, an einem weiteren Android Kurs Abend, haben wir endlich unseren ersten Code geschrieben...nun ja, eher von Github kopiert. Es ging darum, einen Button interaktiv zu machen:<\/em><\/p>\n

public void submitOrder(View view) {<\/em>
\ndisplay(1);<\/em>
\n}<\/em>
\n\u00a0<\/em>private void display(int number) {<\/em>
\nTextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);<\/em>
\nquantityTextView.setText(\"\" + number);<\/em>
\n}<\/em><\/p>\n

Dieser Java Code macht genau das. Der Code hat 2 Methoden (submitOrder und display). Die submitOrder Methode wird aufgerufen, sobald der Button gedr\u00fcckt wird (android:onClick=\"submitOrder\" -> hier nicht im Code, sondern im XML Layout File). In der submitOrder Methode wird die display Methode aufgerufen, die ein TextView Feld mit der angegebenen Nummer (hier 1) bei Knopf gedr\u00fcckt aktualisiert. Nichts weltbewegendes, aber doch sch\u00f6n, dass wir unseren ersten Javacode schreiben durften und es am Schluss auch ohne Meckern funktioniert hat.<\/p>\n

So langsam wird es interessant (nach der langen Layout-Einf\u00fchrung der letzten paar Android Abende).<\/p>\n

\u00dcbrigens k\u00f6nnen wie immer auch absolute Anf\u00e4nger und einfach nur Interessierte am Kurs teilnehmen. Der Kurs ist sehr langsam aufgebaut, so dass auch Neulinge jeweils gut reinkommen. Versprochen.<\/p>\n

Beim n\u00e4chsten Mal geht's weiter mit Coden.<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":19,"featured_media":197,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"acf":[],"yoast_head":"\nAndroid Studio 4 - TechLab Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Studio 4 - TechLab Blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/\" \/>\n<meta property=\"og:site_name\" content=\"TechLab Blog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/HTW.Chur.Bibliothek\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-23T08:51:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-23T08:53:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.fhgr.ch\/techlab\/wp-content\/uploads\/sites\/3\/2019\/01\/pathum-danthanarayana-466070-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"6000\" \/>\n\t<meta property=\"og:image:height\" content=\"4000\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/blog.fhgr.ch\/techlab\/wp-content\/uploads\/sites\/3\/2019\/01\/pathum-danthanarayana-466070-unsplash.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Gesch\u00e4tzte Lesezeit\">\n\t<meta name=\"twitter:data1\" content=\"1 Minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#organization\",\"name\":\"FH Graub\\u00fcnden\",\"url\":\"https:\/\/blog.fhgr.ch\/techlab\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#logo\",\"inLanguage\":\"de-DE\",\"url\":\"https:\/\/blog.fhgr.ch\/techlab\/wp-content\/uploads\/sites\/3\/2019\/09\/fhgr_rgb_granit.png\",\"width\":7512,\"height\":1182,\"caption\":\"FH Graub\\u00fcnden\"},\"image\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#website\",\"url\":\"https:\/\/blog.fhgr.ch\/techlab\/\",\"name\":\"TechLab Blog\",\"description\":\"FHGR TechLab Blog\",\"publisher\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#organization\"},\"inLanguage\":\"de-DE\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#primaryimage\",\"inLanguage\":\"de-DE\",\"url\":\"https:\/\/blog.fhgr.ch\/techlab\/wp-content\/uploads\/sites\/3\/2019\/01\/pathum-danthanarayana-466070-unsplash.jpg\",\"width\":6000,\"height\":4000},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#webpage\",\"url\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/\",\"name\":\"Android Studio 4 - TechLab Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#primaryimage\"},\"datePublished\":\"2019-05-23T08:51:57+00:00\",\"dateModified\":\"2019-05-23T08:53:45+00:00\",\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#webpage\"},\"author\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#\/schema\/person\/d30dd528ce3a2c94b135eba596e7e010\"},\"headline\":\"Android Studio 4\",\"datePublished\":\"2019-05-23T08:51:57+00:00\",\"dateModified\":\"2019-05-23T08:53:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#organization\"},\"image\":{\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#primaryimage\"},\"articleSection\":\"TechLab\",\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.fhgr.ch\/techlab\/2019\/05\/23\/android-studio-4\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.fhgr.ch\/techlab\/#\/schema\/person\/d30dd528ce3a2c94b135eba596e7e010\",\"name\":\"marcelhanselmann\",\"sameAs\":[\"https:\/\/www.facebook.com\/HTW.Chur.Bibliothek\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/posts\/332"}],"collection":[{"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/comments?post=332"}],"version-history":[{"count":4,"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/posts\/332\/revisions"}],"predecessor-version":[{"id":336,"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/posts\/332\/revisions\/336"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/media\/197"}],"wp:attachment":[{"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/media?parent=332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/categories?post=332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fhgr.ch\/techlab\/wp-json\/wp\/v2\/tags?post=332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}