Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old February 1st, 2012, 04:23 PM   #1 (permalink)
New Member
 
nathanpc's Avatar
 
Join Date: Feb 2012
Location: Brazil
Posts: 4
 
Device(s): Motorola Droid, Samsung Galaxy S I9000B, Samsung Galaxy Tab P1000L, HTC Touch Pro2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nathanpc Send a message via MSN to nathanpc Send a message via Yahoo to nathanpc Send a message via Skype™ to nathanpc eeepc904
Notsure Android Documentation List View Example Source Code In XML

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().

nathanpc is offline  
Reply With Quote
Sponsors
Old February 2nd, 2012, 03:19 PM   #2 (permalink)
Senior Member
 
Join Date: Jul 2010
Posts: 977
 
Device(s): Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Thanks: 52
Thanked 199 Times in 144 Posts
Default

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.
jonbonazza is online now  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:25 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo