0
I have an image view on android, I wonder how can I exchange this image via code ? Thank you
0
I have an image view on android, I wonder how can I exchange this image via code ? Thank you
1
Try it like this :
ImageView img= (ImageView) findViewById(R.id.image_id);
img.setImageResource(R.drawable.nova_imagem);
Or
ImageView img= (ImageView) findViewById(R.id.image_id);
Bitmap bitImage = BitmapFactory.decodeResource(this.getResources(), R.drawable.minha_nova_imagem);
img.setImageBitmap(bImage);
Greetings!
Browser other questions tagged java android
You are not signed in. Login or sign up in order to post.
worked well friend, taking advantage you know how I can create a folder inside the drawable or something similar to be able to organize better ?
– Augusto Furlan
Friend, if possible, could you create a new question? For people who come to search, find it more easily ! Thank you!
– Thiago Luiz Domacoski
I created it, but no one answered, I’ll get the link
– Augusto Furlan
http://answall.com/questions/95576/android-studio-criar-diretorios
– Augusto Furlan