public LayerDrawable test(Context context, dynamicImg) {
LayerDrawable layerDrawable =(LayerDrawable) context.getResources().getDrawable(R.drawable.layerlist);
Drawable drawable = context.getResources().getDrawable(R.drawable.ic_launcher);
layerDrawable.setDrawableByLayerId(R.id.userimage, dynamicImg);
return layerDrawable;
}
```<!-- more -->
#### 2.drawable下的layerlist.xml文件:
<?xml version=”1.0” encoding=”UTF-8”?>
```