I am doing an app related to football.  I have a list view that will
have various rows representing teams.  In my custom array adapter I
want to write some code that will present an icon for the team
represented by the row.  I have a drawable resource for each team (for
instance for Indianapolis, Ind.png).

In my code I can't refer to "R.drawable.Ind" because the Ind part is
dynamic.  That value would be in an array, like TeamArray[position].
As I expected, I certainly can't use R.drawable.TeamArray[position]
because it won't even compile, it expects a literal name from the
drawable folder.

Is there a way to do this?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to