i want to create a Listview with two different Layouts.
The first item should have a black background with a white font and the second reversed.
The third a balck background again and so on.
Any one a idea?
i want to create a Listview with two different Layouts. The first item should
Share
What you need to do is use a custom
Adapter.Using that, you can create custom layouts for your
ListViews.Try having a look at these two tutorials, they helped me out a lot:
Creating a ListView using SimpleAdapter: http://eureka.ykyuen.info/2010/01/03/android-simple-listview-using-simpleadapter/
Applying alternate row colors using SimpleAdapter: http://eureka.ykyuen.info/2010/03/15/android-%E2%80%93-applying-alternate-row-color-in-listview-with-simpleadapter/
Good luck.