Possible Duplicate:
Android dynamic String Resources
I have the following:
TextView text = (TextView)vi.findViewById(R.id.text);
TextView txtSub = (TextView)vi.findViewById(R.id.txtSub);
TextView txtA = (TextView)vi.findViewById(R.id.txtA);
TextView txtB = (TextView)vi.findViewById(R.id.txtB);
Is it possible to access these using a String instead (this just pseudocode)?
String resourceName = "text";
TextView text = (TextView)vi.findViewById(R.id. + resourceName);
Use Resources.getIdentifier():