{"id":836,"date":"2018-12-24T06:07:30","date_gmt":"2018-12-23T23:07:30","guid":{"rendered":"https:\/\/luckytruedev.com\/learning\/?p=836"},"modified":"2019-09-21T22:24:47","modified_gmt":"2019-09-21T15:24:47","slug":"pengenalan-android-user-interface-ui-textview","status":"publish","type":"post","link":"https:\/\/luckytruedev.com\/learning\/pengenalan-android-user-interface-ui-textview\/","title":{"rendered":"Pengenalan Android User Interface (UI) TextView"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"409\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview-1024x409.png\" alt=\"\" class=\"wp-image-843\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview.png 1024w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview-300x120.png 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview-768x307.png 768w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview-110x44.png 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview-420x168.png 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview-770x308.png 770w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/xml-font-preview-20x8.png 20w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Android TextView (Sumber Gambar Google)<\/figcaption><\/figure><\/div>\n\n\n\n<p><strong>TextView\u00a0<\/strong>menampilkan teks ke pengguna dan secara opsional memungkinkan mereka untuk mengeditnya. TextView adalah editor teks lengkap.<\/p>\n\n\n<div id=\"lucky-3847083423\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5605825534849002\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-5605825534849002\" \ndata-ad-slot=\"5317815257\" \ndata-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n<p><br><br>Ini dinyatakan pada class seperti di bawah ini :<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code brush: plain; notranslate\">TextView textview = (TextView) findViewById(R.id.texty);<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Beberapa Atribut Penting TextView di layout&nbsp;:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>android:id<\/strong> = Ini adalah ID yang secara unik mengidentifikasi kontrol.<\/li><li><strong>android:text<\/strong> = Menampilkan Teks<\/li><li><strong>android:textColor<\/strong> = Pewarnaan pada text<\/li><li><strong>android:textSize<\/strong> = ukuran text<\/li><\/ul>\n\n\n\n<p>Android TextView memungkinkan Anda menampilkan teks dalam aplikasi android. Berikut adalah contohnya.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code brush: plain; notranslate\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?>\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:layout_margin=\"16dp\"\n    android:orientation=\"vertical\">\n\n    &lt;TextView\n        android:id=\"@+id\/textView3\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\u201cFree Android \u2013 java \u2013 Kotlin Lessons\"\n        android:textAppearance=\"?android:attr\/textAppearanceSmall\" \/>\n\n    &lt;TextView\n        android:id=\"@+id\/textView4\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_marginTop=\"16dp\"\n        android:text=\u201cLearn Android App Development\"\n        android:textAppearance=\"?android:attr\/textAppearanceMedium\" \/>\n\n    &lt;TextView\n        android:id=\"@+id\/textView5\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\u201cMaster Android App\"\n        android:textAppearance=\"?android:attr\/textAppearanceLarge\" \/>\n   \n    &lt;TextView\n        android:id=\"@+id\/textView8\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"16dp\"\n        android:layout_marginTop=\"16dp\"\n        android:text=\u201cMaster Android App in Red\"\n        android:textColor=\"#ba0404\"\n        android:textSize=\"24dp\" \/>\n &lt;\/LinearLayout><\/pre>\n\n\n<div id=\"lucky-2758973550\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5605825534849002\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-5605825534849002\" \ndata-ad-slot=\"3760179245\" \ndata-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Font Khusus<\/strong><\/h2>\n\n\n\n<p>Anda dapat menentukan font kustom Anda sendiri untuk string di aplikasi Anda. Anda hanya perlu mendownload font yang dibutuhkan dari internet, dan letakkan di folder aset \/ font. <br><br>1. Menambahkan File Font.TTF.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"405\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10-1024x405.png\" alt=\"\" class=\"wp-image-891\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10.png 1024w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10-300x119.png 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10-768x304.png 768w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10-110x44.png 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10-420x166.png 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10-770x305.png 770w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture1-10-20x8.png 20w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Menambahkan File Font<\/figcaption><\/figure><\/div>\n\n\n\n<p>2. ketikan kode sintaks &amp; deklarasi.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"366\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4-1024x366.png\" alt=\"\" class=\"wp-image-892\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4.png 1024w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4-300x107.png 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4-768x275.png 768w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4-110x39.png 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4-420x150.png 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4-770x275.png 770w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture2-4-20x7.png 20w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Deklarasikan Kode Sintaks<\/figcaption><\/figure><\/div>\n\n\n\n<p>3. Hasil.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"837\" height=\"377\" src=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3.png\" alt=\"\" class=\"wp-image-893\" srcset=\"https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3.png 837w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3-300x135.png 300w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3-768x346.png 768w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3-110x50.png 110w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3-420x189.png 420w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3-770x347.png 770w, https:\/\/luckytruedev.com\/learning\/wp-content\/uploads\/2018\/12\/Picture3-3-20x9.png 20w\" sizes=\"auto, (max-width: 837px) 100vw, 837px\" \/><figcaption>Hasil Font Khusus<\/figcaption><\/figure><\/div>\n\n\n\n<p>Sumber : Master Android (App)<\/p>\n<div id=\"lucky-1245901743\" class=\"lucky-after-content lucky-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-5605825534849002\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-5605825534849002\" \ndata-ad-slot=\"5317815257\" \ndata-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>TextView\u00a0menampilkan teks ke pengguna dan secara opsional memungkinkan mereka untuk mengeditnya. TextView adalah editor teks lengkap. Ini dinyatakan pada class seperti di bawah ini : Beberapa Atribut Penting TextView di layout&nbsp;: android:id = Ini adalah ID yang secara unik mengidentifikasi kontrol. android:text = Menampilkan Teks android:textColor = Pewarnaan pada text android:textSize = ukuran text Android [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":843,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-836","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ltdv-android-tutor"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts\/836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/comments?post=836"}],"version-history":[{"count":1,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts\/836\/revisions"}],"predecessor-version":[{"id":2294,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/posts\/836\/revisions\/2294"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/media\/843"}],"wp:attachment":[{"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/media?parent=836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/categories?post=836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/luckytruedev.com\/learning\/wp-json\/wp\/v2\/tags?post=836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}