In xml, work component properties:
To make visible
android:visibility="visible" :
To keep only the image space occupied in xml, but invisible:
android:visibility="invisible"
To remove the visibility of the occupied space and image:
android:visibility="gone"
In java code, call the setVisibility method:
To make visible:
imageView.setVisibility(View.VISIBLE);
To keep only the image space occupied in xml, but invisible:
imageView.setVisibility(View.INVISIBLE);
To remove the visibility of the occupied space and image:
imageView.setVisibility(View.GONE);
Put a [mcve]. Any questions read [Ask] or then do our [tour].
– Augusto Vasques