-1
setListAdapter(ArrayAdapter.createFromResource(getApplicationContext(),
R.array.listOfCountries, R.layout.row));
,这让从这个资源XML
<string-array name="listOfCountries">
<item>Bulgaria</item>
<item>Canada</item>
<item>Croatia</item>
<item>USA</item>
<item>UK</item>
</string-array>
基本列表视图,但我需要添加当前图像TU每一个国家,例如到保加利亚我想添加布拉格里亚的旗帜等等。
但我需要在资源中存储此字符串数组,因为我想为更多语言进行本地化。
谢谢
以下教程将帮助您满足您的需求** [Custom ListView](http://www.ezzylearning.com/tutorial.aspx?tid=1763429)和[this](http://android-er.blogspot。 co.uk/2010/06/custom-arrayadapter-with-with-different.html)**视频 - [youtubeVideo](http://www.youtube.com/watch?v=LjAlNfa6obU)希望它有帮助 – GoCrazy 2012-07-26 17:36:26