The Android documentation implies that I should prefer to use XML when declaring the UI: http://developer.android.com/guide/topics/ui/declaring-layout.html
Regardless of whether you agree that it implies this, my personal preference is to use XML when possible.
However, for ListView the documentation only explains how to populate it programmatically: http://developer.android.com/guide/topics/ui/layout/listview.html
How do I, say, create a ListView with three elements using only the XML layout file? Is this impossible or undesirable?
Being used to developing for the Desktop, I am not accustomed to being required to manually create elements of UI containers, so I am confused as to whether I am missing something or things are different in Android.
ListView and similar Views will, in general, receive data coming from a dynamic source (like a SQLite database). In that case, the only way to populate it is programmatically.
However, if you have a static list of elements, you can populate it via XML with the following attribute: android:entries. The value would be an array resource.
Example: