How to remove a image in imageview in android and also how to hide the entire image.
Here I have placed an image in imageview by the below code.
answerState1.setBackgroundResource(R.drawable.correct);
I don't know how to remove or hide the image. Also I am entirely new to android development.
Try the following code:
You can use
answerState1.setVisibility(View.INVISIBLE);
to make view invisible andanswerState1.setVisibility(View.Gone);
to make the view invisible.You can set the visibility of an image with the following method calls:
In UI, you can also do something like the following:
try this imageview.setVisibility(ImageView.INVISIBLE);