0

I would like to have sequence of set R.drawable been called in integer array so that it can be accessed later with choice.But I'll like to load to the R.drawable dynamically which corresponds to different names.It names needs to be had as per the external value input not hardcoded.I tried this in making many but like use list,set,array conversion etc.Kindly guide me with a snippet or example on this regard.Thank you.

Karthik
  • 4,943
  • 19
  • 53
  • 86

1 Answers1

0

I suppose, that best way to achieve this funcionality is by using ArrayAdapter of Integer.

You will simply add drawble resources by id.

If you need to get resource id, but you will get string input from user, you can use this code:

Android, getting resource ID from string?

Community
  • 1
  • 1
frogggias
  • 53
  • 1
  • 6