This week's book giveaway is in the Security forum.
We're giving away four copies of Securing DevOps and have Julien Vehent on-line!
See this thread for details.
Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get an image icon which is defined in a resourses file into an activity  RSS feed

Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've defined some code like below which is in a file called icons, under layout folder which is kind of resources

and I want to retrieve it into a class which is kind of ListActivity and put it in an array, then put the array of these icons as a small pic on each item of the ListView. for example in the code below which I wrote in the class that extends from ListActivity, I've defined an array of country_icons in the file that I mentioned which is kind of resources
and put them in the TypedArray . but now I want some expression like TypedArray icons = res.obtainTypedArray(R.array.country_icons); to get the above icon from that and create a new array in the ListActivity class and then put the array as an argument of ImageAndTextAdapter() instead of icons parameter in the below code!

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!