Android hide and removing the image in imageview

前端 未结 4 1300
误落风尘
误落风尘 2021-02-19 11:38

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.

answerSt         


        
4条回答
  •  忘掉有多难
    2021-02-19 12:37

    Try the following code:

    ImageView im = (ImageView)findViewById(R.id.imageView1);
    im.setVisibility(View.INVISIBLE);
    im.getLayoutParams().height = 0;
    

提交回复
热议问题