{"id":3721,"date":"2011-11-20T20:43:13","date_gmt":"2011-11-20T15:13:13","guid":{"rendered":"http:\/\/windowsvj.com\/wpblog\/2011\/11\/display-text-on-android-application-screen\/"},"modified":"2011-11-20T20:43:13","modified_gmt":"2011-11-20T15:13:13","slug":"display-text-on-android-application-screen","status":"publish","type":"post","link":"http:\/\/windowsvj.com\/wpblog\/2011\/11\/display-text-on-android-application-screen\/","title":{"rendered":"Display Text on Android application Screen"},"content":{"rendered":"<p>For all those new Android developers out there, here is how you can set text and display it on your Android application\u2019s front end. <\/p>\n<blockquote>\n<p>TextView textViewObject = new TextView(this);<\/p>\n<p>textViewObject.setText(\u201cHello, Android\u201d);<\/p>\n<p>setContentView( textViewObject);<\/p>\n<\/blockquote>\n<p>The output on the screen would look like : <\/p>\n<p align=\"center\"><a href=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2011\/11\/image30.png\" class=\"thickbox\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/windowsvj.com\/wpblog\/wp-content\/uploads\/2011\/11\/image_thumb30.png\" width=\"299\" height=\"449\" \/><\/a><\/p>\n<p>Here you create a TextView class\u2019s object textViewObject with the class constructor, which accepts an Android <code>Context<\/code> instance as its parameter.<\/p>\n<p>Next, you define the text content with <code>setText()<\/code>.<\/p>\n<p>Finally, you pass the TextView to <code>setContentView()<\/code> in order to display it as the content for the Activity UI. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>For all those new Android developers out there, here is how you can set text and display it on your Android application\u2019s front end. TextView textViewObject = new TextView(this); textViewObject.setText(\u201cHello, Android\u201d); setContentView( textViewObject); The output on the screen would look like : Here you create a TextView class\u2019s object textViewObject [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[257],"tags":[],"class_list":["post-3721","post","type-post","status-publish","format-standard","hentry","category-android-2"],"_links":{"self":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/comments?post=3721"}],"version-history":[{"count":0,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/posts\/3721\/revisions"}],"wp:attachment":[{"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/media?parent=3721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/categories?post=3721"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/windowsvj.com\/wpblog\/wp-json\/wp\/v2\/tags?post=3721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}