简体   繁体   中英

Android: How do I create a custom ListView like this?

How do I make a custom ListView similar to this?

列表显示

I want to have a ListView with some US States like Michigan , and upon selection I want to open a new ListView with all the cities in that state.

There are a bunch of tutorials out there about custom ListView, but I am looking for one similar to what I want to do here. I am new to Android programming and I feel its hard to change the code to what I want if the tutorial is very different.

Can someone please show me an Example here or link me to a tutorial that is be very helpful?

Thanks!

You need to define your own layout for the rows in the ListView and use it in your adapter. Please follow this tutorial for more details: http://www.vogella.com/articles/AndroidListView/article.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM