content will override the “default” one • No need to override everything • Per screen density (drawable-mdpi, drawable-hdpi, etc) • Per device sizes (layout-sw600dp, layout- h560dp, etc) • Per language (values-it, values-es, etc) • Mixed (drawable-sw600dp-xxhpi)
their relationships) are described inside a layout (.xml) file • use attributes, strings and styles • View with ID can be fetch by the activity findViewById(R.id.main_list); • Reusable UI (also across other layouts)
UI that can be placed in an Activity (through FragmentManager). • Fragment is closely tied to the Activity it is in (lifecycle dependency) • and can not be used apart from one. • Specialized piece of a larger Activity • Reusable logic.
AndroidManifest.xml to be launched (!) • Create an intent, with the activity class, then start it Intent create = new Intent(this, HelloActivity.class); startActivity(create); • if the activity returns something startActivityForResult(Intent, int)
and display the content of a “list of things”. • Reflect data changes to the view TodoAdapter adapter = new TodoAdapter(); ListView listView = (ListView) findViewById(R.id.main_list); listView.setAdapter(adapter);