Need to find an item by name. Found in documentation this decision. But the problem is that getResource returns me always zeros in this case:
int z = getResources().getIdentifier("R.drawable.bag", "String", getPackageName()); If I set the picture as standard:
ImageView ivLogo = (ImageView) findViewById(R.id.imageViewLogoV); ivLogo.setImageResource(R.drawable.bag); then everything is displayed correctly. What is the problem?