For example, in your XML layout file, there is imageview1
<ImageView android:id="@+id/imageview1" android:layout_gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" />
in your java src,
ImageView img=(ImageView)findViewById(R.id.imageview1); img.setVisibility(View.GONE); img.setVisibility(View.VISIBLE); img.setVisibility(View.INVISIBLE);
you can google the difference between View.Gone and View.VISIBLE
ninikin
source share