获取 Android 源码包中的资源

 String path = "com/example/testres/1.jpg";
        InputStream is = getClassLoader().getResourceAsStream(path);
        Drawable background = Drawable.createFromStream(is, null);