{"id":452,"date":"2012-10-01T18:01:39","date_gmt":"2012-10-01T18:01:39","guid":{"rendered":"http:\/\/devnot.wordpress.com\/?p=452"},"modified":"2012-10-01T18:01:39","modified_gmt":"2012-10-01T18:01:39","slug":"attach-items-to-a-listview","status":"publish","type":"post","link":"https:\/\/thomas-jansen.eu\/?p=452","title":{"rendered":"Attach items to a listview"},"content":{"rendered":"<p>A listview shows data provided by an adapter. To create a simple list use the following:<\/p>\n<pre>\n\/\/Find the listview with id 'list' in the resources \nListView listView = (ListView) findViewById(R.id.list);\n\n\/\/Make a connection through an adapter \nlistView.setAdapter(new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_list_item_1, new String[] {\"AAA\", \"BBB\", \"CCC\"}));\n\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A listview shows data provided by an adapter. To create a simple list use the following: \/\/Find the listview with id &#8216;list&#8217; in the resources ListView listView = (ListView) findViewById(R.id.list); \/\/Make a connection through an adapter listView.setAdapter(new ArrayAdapter&lt;String&gt;(MainActivity.this, android.R.layout.simple_list_item_1, new String[] {&#8220;AAA&#8221;, &#8220;BBB&#8221;, &#8220;CCC&#8221;}));<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-android-java"],"_links":{"self":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=452"}],"version-history":[{"count":0,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/452\/revisions"}],"wp:attachment":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}