I've something like this
for (int i=0; i<dbHelper.cantidad_restaurants; i++) {
datos.add(new clsRestaurants(R.drawable.res_1, "Este es el Restaurant 1", "Esta es la descripcion del REstaurant 1"));
datos.add(new clsRestaurants(R.drawable.res_2, "Este es el Restaurant 2", "Esta es la descripcion del REstaurant 2"));
datos.add(new clsRestaurants(R.drawable.res_3, "Este es el Restaurant 3", "Esta es la descripcion del REstaurant 3"));
datos.add(new clsRestaurants(R.drawable.res_5, "Este es el Restaurant 5", "Esta es la descripcion del REstaurant 5"));
}
I'd like instead of writing R.Drawable.Res_1 i could write something like
"R.Drawable.Res_ + i "
Where I is the number of the for loop