• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android Documentation List View Example Source Code In XML

nathanpc

Lurker
If you look at the Android documentation about how to implement a List View and populate it you will notice that they only teach you how to do it in Java extending ListActivity instead of the normal Activity, but how would the same code (layout and populate the list) using XML layout files and extending Activity?

I'm asking this because I want to implement a RelativeLayout and add more elements to the screen where the ListView is with more flexibility than using .inflate() and addHeaderView()/addFooterView().
 
Why not just create your UI in XML, then use the ListActivity? Then if you need to alter the list itself, you do so in code within your activity.
 
Back
Top Bottom