Here is a simple and quick way to achieve it:
try
{
PackageManager manager = getPackageManager();
Resources resources = manager.getResourcesForApplication("com.example.packagename");
int resId = resources.getIdentifier("drawable_id", "drawable", "com.example.packagename");
Drawable myDrawable = resources.getDrawable(resId);
// Do something
}
catch (Exception e)
{
e.printStackTrace();
}
Change com.example.packagename
width the package name of the app you need the resources.
Change drawable_id
with the resource Id.
Change drawable
to the folder name you want (drawable
, layout
, values
, ...)