通过资源文件名获得资源ID
int resID = getResources().getIdentifier("org.loveandroid.androidtest:drawable/gallery_photo_1",null,null);