i have a problem with displaying an image on imageButton...
imgWeatherIcon = (ImageButton) findViewById(R.id.mndpImage);
Intent i = getIntent();
this.iconfile = i.getStringExtra("icon");
String uri = "drawable/"+ "d" + iconfile;
System.out.println("* "+ uri);
int imageBtnResource = getResources().getIdentifier(uri, null, getPackageName());
Drawable dimgbutton = getResources().getDrawable(imageBtnResource);
imgWeatherIcon.setImageDrawable(dimgbutton);
some System.out.println outputs:
uri = drawable/dsnowing
imageBtnResource = 2130837512
dimgbutton = android.graphics.drawable.BitmapDrawable@414733c8
the image exist in the drawable folder name of the imageButton element (mndpImage) in layout is correct
any idea how to solve this problem ?