I'm making an layout with 400 imageView. The question is how I can set R.id.imageView>>i<<
for(int i = 1; i < 401; i++){
ImageView imageView = (ImageView)findViewById(R.id.imageView-i-);
}
I'm making an layout with 400 imageView. The question is how I can set R.id.imageView>>i<<
for(int i = 1; i < 401; i++){
ImageView imageView = (ImageView)findViewById(R.id.imageView-i-);
}
for (int i = 1; i <= 400; i++) {
String s = "imageview" + i;
int id = getResources.getIdentifier(s, "id", getPackageName ());
ImageView imageview = (ImageView)findViewById (id);
}
This should work