createFromPath , .
:
int id = getResources (). getIdentifier (CoverimgUrl.get (position), "id", getPackageName ()); holder.Viewcover.setImageDrawable (GetResources () getDrawable (ID).);
getIdentifier () gets the identifier from the string. When you use the "R" class, it contains static integers for identifiers. So R.id.some_name is actually an integer, which is the identifier of the resource some_name.
Once you get this integer using getIdentifier, you can use getResources (). getDrawable () to get drawable with given ID.
Let me know if this works.
source
share