【问题标题】:How to hide the Image inside an ImageView, Without hiding its background? [closed]如何在 ImageView 中隐藏图像,而不隐藏其背景? [关闭]
【发布时间】:2013-10-15 15:41:08
【问题描述】:

嗯,实际上标题说明了一切。

我需要在 ImageView 中隐藏 SRC 中的图像,而不是用它的背景隐藏整个 ImageView。

背景必须保留。

谢谢。

【问题讨论】:

  • 我不确定你是否可以只选择视图的src,但你可以尝试将图像视图包装在线性布局中,然后设置布局的背景并声明imgView.setVisibilit( View.INVISIBLE)

标签: android android-layout background imageview visibility


【解决方案1】:

试试这个:imageview src @null。

【讨论】:

  • 正确@harshit 它会工作
【解决方案2】:

有两种解决方案

1 : 将透明图像设置为 imageview 2:或者将imageview的可见性设置为不可见或消失

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多