Useful notes & manuals
from the
world wide web
L:
P:
Register now!
Accessing resource by variable Android
Solution from: http://stackoverflow.com/questions/3218520/how-can-i-access-an-android-drawable-by-a-variable Created by tlw on 16.06.2019 @ 11:02

Explaining how to access any resource by variable, not directly. Example with "drawables".

String icon="logo" + cnt;
int resID = getResources().getIdentifier(icon, "drawable", getPackageName());
logo.setImageResource(resID);

resources   access   drawables   variable   dynamic
 
Created by THE LOST WEB © 2009-2012