Jacob Joz Jacob Joz - 6 days ago 7
Android Question

Custom ListView Item Graphical Layout Android

Please forgive my ignorance, but this is my 3rd day with Android, and I've looked at tutorials, and they all seem to focus on the xml declaration of listview item UI. My question is this, I'd like to be able to see the custom listview item UI in the designer "Graphical Layout" in Eclipse. However, it displays it just like it does any other view in Android, ie. with the title and status bar at the top and taking up the entire screen. What I'd like to see is just the listview item that I'm designing ie. just 50dp tall and filled width. Is there a way to do this?

Answer

I believe what you are looking for is a custom adapter. What you are seeing is just the listview item, what you are looking for is the custom layout. Have a look at this tutorial, specifically the part on designing the custom layout and the custom adapter.

http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/

Comments