{"id":4709,"date":"2014-03-30T14:49:50","date_gmt":"2014-03-30T14:49:50","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/android-change-fonts-on-a-final-text-view-collection-of-common-programming-errors\/"},"modified":"2014-03-30T14:49:50","modified_gmt":"2014-03-30T14:49:50","slug":"android-change-fonts-on-a-final-text-view-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/android-change-fonts-on-a-final-text-view-collection-of-common-programming-errors\/","title":{"rendered":"Android, change fonts on a final text view-Collection of common programming errors"},"content":{"rendered":"<p>I want to change the font on a text view But the tv is modified at the pression of a button, and i define &#8220;final&#8221; the tv, and the app crashed&#8230; what i can do it?<\/p>\n<pre><code>Typeface tf = Typeface.createFromAsset(getAssets(), \"fonts\/HeroQuest.ttf\");\nfinal TextView tv = (TextView) findViewById(R.id.textView1);\n    tv.setTypeface(tf);\n<\/code><\/pre>\n<p>This code work if tv is not final<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I want to change the font on a text view But the tv is modified at the pression of a button, and i define &#8220;final&#8221; the tv, and the app crashed&#8230; what i can do it? Typeface tf = Typeface.createFromAsset(getAssets(), &#8220;fonts\/HeroQuest.ttf&#8221;); final TextView tv = (TextView) findViewById(R.id.textView1); tv.setTypeface(tf); This code work if tv is not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4709","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4709"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4709\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}