2014-09-26 39 views

回答

1

可以使用

int id = getResources().getIdentifier("pic_" + 4, "drawable", getPackageName()); 
if (id > 0) { 

} 

從文檔:

Return a resource identifier for the given resource name. 
相關問題